Home | History | Annotate | Download | only in cintltst

Lines Matching refs:test_format

57  *  test_format.   Helper function for checking the results of a formatting
70 static void test_format(const char *format, int32_t bufCap, int32_t indent,
298 test_format("hello, world", 50, 0, "hello, world", __LINE__);
299 test_format("hello, world", 50, 4, " hello, world", __LINE__);
300 test_format("hello, world", 3, 0, "hello, world", __LINE__);
302 test_format("a character %c", 50, 0, "a character x", __LINE__, 'x');
303 test_format("a string %s ", 50, 0, "a string hello ", __LINE__, "hello");
304 test_format("uchars %S ", 50, 0, "uchars 41fe 0042 0043 0000 ", __LINE__, s1, -1);
305 test_format("uchars %S ", 50, 0, "uchars 41fe 0042 ", __LINE__, s1, 2);
307 test_format("a byte %b--", 50, 0, "a byte dd--", __LINE__, 0xdd);
308 test_format("a 16 bit val %h", 50, 0, "a 16 bit val 1234", __LINE__, 0x1234);
309 test_format("a 32 bit val %d...", 50, 0, "a 32 bit val 6789abcd...", __LINE__, 0x6789abcd);
310 test_format("a 64 bit val %l", 50, 0, "a 64 bit val 123456780abcdef0"
315 test_format("a 32 bit ptr %p", 50, 0, "a 32 bit ptr deadbeef", __LINE__, ptr);
318 test_format("a 64 bit ptr %p", 50, 0, "a 64 bit ptr 1000200030004000", __LINE__, ptr);
326 test_format("a 128 bit ptr %p", 50, 0, "a 128 bit ptr 10002000300040005000600070008000", __LINE__, ptr);
332 test_format("%vc", 100, 0, "abc[ffffffff]", __LINE__, "abc", -1);
333 test_format("%vs", 100, 0, "s1\ns2\n[00000002]", __LINE__, a1, 2);
334 test_format("%vs", 100, 4, " s1\n s2\n [00000002]", __LINE__, a1, 2);
336 test_format("%vb", 100, 0, "41 42 43 [00000003]", __LINE__, "\x41\x42\x43", 3);
339 test_format("Null string - %s", 50, 0, "Null string - *NULL*", __LINE__, NULL);
340 test_format("Null string - %S", 50, 0, "Null string - *NULL*", __LINE__, NULL);
341 test_format("Null vector - %vc", 50, 0, "Null vector - *NULL* [00000002]", __LINE__, NULL, 2);
342 test_format("Null vector - %vC", 50, 0, "Null vector - *NULL* [00000002]", __LINE__, NULL, 2);
343 test_format("Null vector - %vd", 50, 0, "Null vector - *NULL* [00000002]", __LINE__, NULL, 2);