Lines Matching refs:hex
12 // Test vectors: input bytes and expected hex strings
29 // Test encoding: bytes -> hex string
32 printf("Testing hex encoding...\n");
40 const char *hex = json_object_get_string(field);
41 assert(strcmp(hex, test_hex_1) == 0);
51 const char *hex = json_object_get_string(field);
52 assert(strcmp(hex, test_hex_2) == 0);
62 const char *hex = json_object_get_string(field);
63 assert(strcmp(hex, test_hex_3) == 0);
73 const char *hex = json_object_get_string(field);
74 assert(strcmp(hex, test_hex_4) == 0);
84 const char *hex = json_object_get_string(field);
85 assert(strcmp(hex, test_hex_5) == 0);
92 // Test decoding: hex string -> bytes
95 printf("Testing hex decoding...\n");
136 // Test 4: Full range with uppercase hex
149 // Test 5: Mixed case hex
168 printf("Testing hex error handling...\n");
229 // Test decode with odd-length hex string
239 // Test decode with invalid hex character
267 // Test round-trip: bytes -> hex -> bytes
270 printf("Testing hex round-trip...\n");