Add property write tests.

This commit is contained in:
Roger A. Light
2018-10-16 21:32:13 +01:00
parent 4daaaaf4a7
commit 77099bb58c
5 changed files with 512 additions and 3 deletions
-2
View File
@@ -231,8 +231,6 @@ int packet__write_varint(struct mosquitto__packet *packet, int32_t word)
uint8_t byte;
int count = 0;
packet->payload = NULL;
packet->remaining_count = 0;
do{
byte = word % 128;
word = word / 128;
+1
View File
@@ -9,6 +9,7 @@ TEST_OBJS = test.o \
datatype_read.o \
datatype_write.o \
property_read.o \
property_write.o \
stubs.o \
util_topic_test.o \
utf8.o
+1 -1
View File
@@ -338,7 +338,7 @@ static void varint_prop_read_helper(
CU_ASSERT_PTR_NULL(properties);
}
void packet_helper_reason_string_user_property(void)
static void packet_helper_reason_string_user_property(void)
{
uint8_t payload[24] = {23,
PROP_REASON_STRING, 0, 6, 'r', 'e', 'a', 's', 'o', 'n',
File diff suppressed because it is too large Load Diff
+2
View File
@@ -6,6 +6,7 @@
int init_datatype_read_tests(void);
int init_datatype_write_tests(void);
int init_property_read_tests(void);
int init_property_write_tests(void);
int init_utf8_tests(void);
int init_util_topic_tests(void);
@@ -22,6 +23,7 @@ int main(int argc, char *argv[])
|| init_datatype_read_tests()
|| init_datatype_write_tests()
|| init_property_read_tests()
|| init_property_write_tests()
|| init_util_topic_tests()
){