Home | History | Annotate | Download | only in tests

Lines Matching defs:fmt

33 static void check(const char *fmt, int expect_type, int expect_size)
38 if (utilfdt_decode_type(fmt, &type, &size))
39 FAIL("format '%s': valid format string returned failure", fmt);
41 FAIL("format '%s': expected type='%c', got type='%c'", fmt,
44 FAIL("format '%s': expected size=%d, got size=%d", fmt,
48 static void checkfail(const char *fmt)
53 if (!utilfdt_decode_type(fmt, &type, &size))
55 fmt);
68 char fmt[10], *ptr;
71 if (strlen(modifier) + 2 >= sizeof(fmt))
73 strcpy(fmt, modifier);
74 ptr = fmt + strlen(fmt);
79 check(fmt, 'i', expected_size);
82 check(fmt, 'u', expected_size);
85 check(fmt, 'x', expected_size);
88 check(fmt, 's', -1);
93 char fmt[10];
107 *fmt = ch;
108 fmt[1] = '\0';
109 checkfail(fmt);