Skip to content

Commit 39e6797

Browse files
franciscovalentecastroedsiper
authored andcommitted
tests: internal: pack: add test to verify msgpack to json macros.
Signed-off-by: Francisco Valente <[email protected]>
1 parent 9b848d4 commit 39e6797

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/internal/pack.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,14 @@ void test_json_pack_mult_iter()
241241
flb_free(buf);
242242
}
243243

244+
/* Validate default values of macros used in flb_msgpack_raw_to_json_sds */
245+
void test_msgpack_to_json_macros()
246+
{
247+
/* Verify default values */
248+
TEST_CHECK(FLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE == 2.0);
249+
TEST_CHECK(FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE == 0.10);
250+
}
251+
244252
/* Validate that duplicated keys are removed */
245253
void test_json_dup_keys()
246254
{
@@ -632,6 +640,7 @@ TEST_LIST = {
632640
{ "json_pack_iter" , test_json_pack_iter},
633641
{ "json_pack_mult" , test_json_pack_mult},
634642
{ "json_pack_mult_iter", test_json_pack_mult_iter},
643+
{ "json_macros" , test_msgpack_to_json_macros},
635644
{ "json_dup_keys" , test_json_dup_keys},
636645
{ "json_pack_bug342" , test_json_pack_bug342},
637646
{ "json_pack_bug1278" , test_json_pack_bug1278},

0 commit comments

Comments
 (0)