Home
last modified time | relevance | path

Searched refs:expect (Results 1 – 15 of 15) sorted by relevance

/picolibc-latest/test/
Dtest-strchr.c42 #define check(func, needle, expect) do { \ argument
47 if (result != expect) { \
49 #func, haystack, needle, result, expect); \
55 #define many_check(func, needle, expect) do { \ argument
56 check(func, needle, expect); \
57 check(func, needle | 0xff00, expect); \
58 check(func, needle | 0x0100, expect); \
59 check(func, needle | 0x8000, expect); \
62 #define many_check(func, needle, expect) do { \ argument
63 check(func, needle, expect); \
[all …]
Dlong_double.c62 within_error(long double expect, long double result, long double error) in within_error() argument
67 if (isnan(expect) && isnan(result)) in within_error()
70 if (expect == result) in within_error()
73 if (expect != 0) in within_error()
74 e = scalbnl(1.0L, -ilogbl(expect)); in within_error()
76 difference = fabsl(expect - result) * e; in within_error()
85 check_long_double(const char *name, int i, long double prec, long double expect, long double result) in check_long_double() argument
87 if (!within_error(expect, result, prec)) { in check_long_double()
88 long double diff = fabsl(expect - result); in check_long_double()
91 printf("%s test %d got %La expect %La diff %La\n", name, i, result, expect, diff); in check_long_double()
[all …]
Dprintf_scanf.c200 int expect; member
202 { .str = L"foo\n", .fmt = L"foo\nbar", .expect = -1 },
203 { .str = L"foo\n", .fmt = L"foo bar", .expect = -1 },
204 { .str = L"foo\n", .fmt = L"foo %d", .expect = -1 },
205 { .str = L"foo\n", .fmt = L"foo\n%d", .expect = -1 },
206 { .str = L"foon", .fmt = L"foonbar", .expect = -1 },
207 { .str = L"foon", .fmt = L"foon%d", .expect = -1 },
208 { .str = L"foo ", .fmt = L"foo bar", .expect = -1 },
209 { .str = L"foo ", .fmt = L"foo %d", .expect = -1 },
210 { .str = L"foo\t", .fmt = L"foo\tbar", .expect = -1 },
[all …]
Dprintf-tests.c52 static int test(int serial, char *expect, char *fmt, ...) { in test() argument
164 if (n != (int) strlen(expect)) { in test()
166 expect, (int) strlen(expect), buf, n); in test()
170 if (strcmp(buf, expect)) { in test()
171 failmsg(serial, "expected \"%s\", got \"%s\"", expect, buf); in test()
203 static int testw(int serial, wchar_t *expect, wchar_t *fmt, ...) { in testw() argument
262 if (n != (int) wcslen(expect)) { in testw()
264 expect, wcslen(expect), wbuf, n); in testw()
268 if (wcscmp(wbuf, expect)) { in testw()
269 failmsgw(serial, L"expected \"%ls\", got \"%ls\"", expect, wbuf); in testw()
Dtest-put.c43 check(char *label, bool ok, int expect, int got) in check() argument
46 fprintf(stderr, "%s: expect %d got %d\n", label, expect, got); in check()
53 check_s(char *label, bool ok, size_t expect, size_t got) in check_s() argument
56 fprintf(stderr, "%s: expect %zd got %zd\n", label, expect, got); in check_s()
Dffs.c88 check(long long int x, int got, int expect, char *which) in check() argument
92 if (got != expect) { in check()
93 printf("failed %s(%08lx%08lx): got %d expect %d\n", which, high, low, got, expect); in check()
Dtest-efcvt.c46 char *expect; member
188 if (strcmp(buf, tests[i].expect) != 0 || \
194 tests[i].expect, tests[i].decpt, tests[i].sign); \
Dtest-memset.c76 expect(size_t pos) in expect() function
96 e = expect(p); in check()
136 buf[p] = expect(p); in fill()
Drounding-mode.c303 #define check_sqrt(mode, param, expect) do { \ in main() argument
306 double __e = (expect); \ in main()
347 #define check_sqrtf(mode, param, expect) do { \ in main() argument
350 float __e = (expect); \ in main()
Dtest-fread-fwrite.c240 uint8_t expect = out[read_offset + i]; in main() local
242 expect++; in main()
243 if (in[read_offset + i] != expect) { in main()
/picolibc-latest/test/semihost/
Dsemihost-readc.c43 char *expect = COMMAND_LINE; in main() local
48 while ((e = *expect++) != '\0') { in main()
/picolibc-latest/test/libc-testsuite/
Dsnprintf.c51 const char *expect; member
98 const char *expect; member
237 TEST_S(b, int_tests[j].expect, "bad integer conversion"); in test_snprintf()
245 TEST_S(b, fp_tests[j].expect, "bad floating point conversion"); in test_snprintf()
/picolibc-latest/doc/
Dusing.md24 may expect these headers to be provided by the C library. Unfortunately
/picolibc-latest/
Dmeson.build70 # detecting many C compiler features, as we cannot expect there
/picolibc-latest/newlib/
DChangeLog-201522638 expect that the handles for stdout and stderr will be 1 and 2.
26287 expect code for specific platforms tie it all together.