Lines Matching full:encoded
251 char encoded[] = "{\"some_string\":\"zephyr 123\uABCD\"," in ZTEST() local
275 char buffer[sizeof(encoded)]; in ZTEST()
280 zassert_equal(len, strlen(encoded), "encoded size mismatch"); in ZTEST()
286 ret = strncmp(buffer, encoded, sizeof(encoded) - 1); in ZTEST()
287 zassert_equal(ret, 0, "Encoded contents not consistent"); in ZTEST()
293 char encoded[] = "{\"some_string\":\"zephyr 123\\uABCD456\"," in ZTEST() local
326 ret = json_obj_parse(encoded, sizeof(encoded) - 1, test_descr, in ZTEST()
391 char encoded[] = "{\"int_max\":2147483647," in ZTEST() local
414 char buffer[sizeof(encoded)]; in ZTEST()
419 ret = json_obj_parse(encoded, sizeof(encoded) - 1, obj_limits_descr, in ZTEST()
422 zassert_str_equal(encoded, buffer, in ZTEST()
423 "Integer limits not encoded correctly"); in ZTEST()
438 char encoded[] = "{\"objects_array\":[" in ZTEST() local
443 char buffer[sizeof(encoded)]; in ZTEST()
449 zassert_str_equal(buffer, encoded, in ZTEST()
450 "Encoded array of objects is not consistent"); in ZTEST()
457 char encoded[] = "{\"objects_array\":[" in ZTEST() local
463 ret = json_obj_parse(encoded, sizeof(encoded), in ZTEST()
506 char encoded[] = "{\"elements\":[" in ZTEST() local
518 char buffer[sizeof(encoded)]; in ZTEST()
524 zassert_str_equal(buffer, encoded, in ZTEST()
525 "Encoded array of objects is not consistent"); in ZTEST()
532 char encoded[] = "[{\"height\":168,\"name\":\"Sim\303\263n Bol\303\255var\"}," in ZTEST() local
537 ret = json_arr_parse(encoded, sizeof(encoded), in ZTEST()
579 char encoded[] = "[" in ZTEST() local
591 char buffer[sizeof(encoded)]; in ZTEST()
596 zassert_equal(len, strlen(encoded), "encoded size mismatch"); in ZTEST()
600 zassert_str_equal(buffer, encoded, in ZTEST()
601 "Encoded array of objects is not consistent"); in ZTEST()
607 char encoded[] = "{\"elements\":[" in ZTEST() local
636 ret = json_obj_parse(encoded, sizeof(encoded) - 1, obj_array_descr, in ZTEST()
712 char encoded[] = "{\"objects_array_array\":[" in ZTEST() local
723 char buffer[sizeof(encoded)]; in ZTEST()
729 zassert_str_equal(buffer, encoded, in ZTEST()
730 "Encoded two-dimensional array is not consistent"); in ZTEST()
794 char encoded[] = "{\"name\":\"Paavo Nurmi\",\"val\":123," in ZTEST() local
806 char buffer[sizeof(encoded)]; in ZTEST()
812 zassert_str_equal(buffer, encoded, in ZTEST()
813 "Encoded two-dimensional extra array is not consistent"); in ZTEST()
877 char encoded[] = "{\"name\":\"Paavo Nurmi\",\"val\":123," in ZTEST() local
889 char buffer[sizeof(encoded)]; in ZTEST()
896 zassert_str_equal(buffer, encoded, in ZTEST()
897 "Encoded two-dimensional extra named array is not consistent"); in ZTEST()
903 char encoded[] = "{\"objects_array_array\":[" in ZTEST() local
972 ret = json_obj_parse(encoded, sizeof(encoded), in ZTEST()
1004 static void parse_harness(struct encoding_test encoded[], size_t size) in parse_harness() argument
1010 ret = json_obj_parse(encoded[i].str, strlen(encoded[i].str), in parse_harness()
1012 zassert_equal(ret, encoded[i].result, in parse_harness()
1014 encoded[i].str, ret, encoded[i].result); in parse_harness()
1020 struct encoding_test encoded[] = { in ZTEST() local
1028 parse_harness(encoded, ARRAY_SIZE(encoded)); in ZTEST()
1033 struct encoding_test encoded[] = { in ZTEST() local
1038 parse_harness(encoded, ARRAY_SIZE(encoded)); in ZTEST()
1043 struct encoding_test encoded[] = { in ZTEST() local
1050 parse_harness(encoded, ARRAY_SIZE(encoded)); in ZTEST()
1055 struct encoding_test encoded[] = { in ZTEST() local
1059 parse_harness(encoded, ARRAY_SIZE(encoded)); in ZTEST()
1065 char encoded[] = "{\"some_string"; in ZTEST() local
1068 ret = json_obj_parse(encoded, sizeof(encoded) - 1, test_descr, in ZTEST()
1076 char encoded[] = "{\"some_string\",}"; in ZTEST() local
1079 ret = json_obj_parse(encoded, sizeof(encoded) - 1, test_descr, in ZTEST()
1087 char encoded[] = "{\"some_string\":false}"; in ZTEST() local
1090 ret = json_obj_parse(encoded, sizeof(encoded) - 1, test_descr, in ZTEST()
1098 char encoded[] = "{\"key_not_in_descr\":123456}"; in ZTEST() local
1101 ret = json_obj_parse(encoded, sizeof(encoded) - 1, test_descr, in ZTEST()
1202 zassert_equal(strlen(buf), 9, "Encoded string length mismatch"); in ZTEST()
1296 char encoded[] = "{" in ZTEST() local
1305 int64_t ret = json_obj_parse(encoded, sizeof(encoded) - 1, large_descr, in ZTEST()
1319 static const char encoded[] = in ZTEST() local
1325 char buffer[sizeof(encoded)]; in ZTEST()
1333 zassert_mem_equal(buffer, encoded, sizeof(encoded), "Encoded contents not consistent"); in ZTEST()
1338 char encoded[] = "{" in ZTEST() local
1350 int64_t ret = json_obj_parse(encoded, sizeof(encoded) - 1, outer_descr, in ZTEST()