Home
last modified time | relevance | path

Searched refs:tests (Results 1 – 22 of 22) sorted by relevance

/stdlib/
A Dtst-strtod1i.c38 } tests[] = in do_test() local
45 #define ntests (sizeof (tests) / sizeof (tests[0])) in do_test()
56 if (setlocale (LC_ALL, tests[n].loc) == NULL) in do_test()
58 printf ("cannot set locale %s\n", tests[n].loc); in do_test()
63 d = __strtod_internal (tests[n].str, &endp, 1); in do_test()
64 if (d != tests[n].exp) in do_test()
67 tests[n].str, d, tests[n].exp); in do_test()
70 else if (endp - tests[n].str != tests[n].nread) in do_test()
73 tests[n].str, endp - tests[n].str, tests[n].nread); in do_test()
A Dtst-strtod2.c9 } tests[] = variable
24 for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) in do_test()
27 double r = strtod (tests[i].str, &ep); in do_test()
28 if (r != tests[i].result) in do_test()
30 printf ("test %zu r = %g, expect %g\n", i, r, tests[i].result); in do_test()
33 if (ep != tests[i].str + tests[i].offset) in do_test()
36 i, ep - tests[i].str, tests[i].offset); in do_test()
A Dtst-xpg-basename.c27 } tests [] = variable
47 for (i = 0; i < sizeof (tests) / sizeof (tests [0]); ++i) in do_test()
49 if (tests [i].path == NULL) in do_test()
53 strcpy (path, tests [i].path); in do_test()
56 if (strcmp (file, tests [i].file)) in do_test()
59 (tests [i].path == NULL ? "NULL" : tests [i].path), file); in do_test()
A Dtst-strtod3.c11 } tests[] = variable
17 #define NTESTS (sizeof (tests) / sizeof (tests[0]))
34 double r = __strtod_internal (tests[i].in, &ep, 1); in do_test()
36 if (strcmp (ep, tests[i].out) != 0) in do_test()
39 i, ep, tests[i].out); in do_test()
43 if (r != tests[i].expected) in do_test()
46 i, r, tests[i].expected); in do_test()
A Dtst-strtod4.c13 } tests[] = variable
18 #define NTESTS (sizeof (tests) / sizeof (tests[0]))
35 double r = __strtod_internal (tests[i].in, &ep, 1); in do_test()
37 if (strcmp (ep, tests[i].out) != 0) in do_test()
40 i, ep, tests[i].out); in do_test()
44 if (r != tests[i].expected) in do_test()
47 i, r, tests[i].expected); in do_test()
A Dtst-strtod5i.c32 } tests[] = variable
63 #define NTESTS (sizeof (tests) / sizeof (tests[0]))
80 double r = __strtod_internal (tests[i].in, &ep, tests[i].group); in do_test()
88 if (r != tests[i].expected in do_test()
89 || copysign (10.0, r) != copysign (10.0, tests[i].expected)) in do_test()
92 i, r, tests[i].expected); in do_test()
A Dtst-strtod5.c31 } tests[] = variable
52 #define NTESTS (sizeof (tests) / sizeof (tests[0]))
69 double r = strtod (tests[i].in, &ep); in do_test()
77 if (r != tests[i].expected in do_test()
78 || copysign (10.0, r) != copysign (10.0, tests[i].expected)) in do_test()
81 i, r, tests[i].expected); in do_test()
A Dtst-atof2.c10 } tests[] = variable
31 #define NTESTS (sizeof (tests) / sizeof (tests[0]))
42 snprintf (buf, sizeof (buf), "%g", atof (tests[i].str)); in do_test()
43 if (strcmp (buf, tests[i].expected) != 0) in do_test()
46 i, buf, tests[i].expected); in do_test()
A Dbug-strtod2.c8 static const char *tests[] = variable
13 #define ntests (sizeof (tests) / sizeof (tests[0]))
23 FTYPE d = strto ## FSUF (tests[i], &endp); \
26 printf ("did not consume all of '%s'\n", tests[i]); \
31 printf ("'%s' does not pass isinf\n", tests[i]); \
A Dtest-canon.c55 } tests[] = { variable
163 for (i = 0; i < (int) (sizeof (tests) / sizeof (tests[0])); ++i) in do_test()
166 result = realpath (tests[i].in, buf); in do_test()
168 if (!check_path (result, tests[i].out)) in do_test()
171 argv[0], i, tests[i].out ? tests[i].out : "NULL", in do_test()
177 if (!check_path (buf, tests[i].out ? tests[i].out : tests[i].resolved)) in do_test()
180 argv[0], i, tests[i].out ? tests[i].out : tests[i].resolved, in do_test()
186 if (!tests[i].out && errno != tests[i].error) in do_test()
189 argv[0], i, tests[i].error, errno); in do_test()
194 char *result2 = realpath (tests[i].in, NULL); in do_test()
A Dtst-strtod-underflow.c62 static const struct test tests[] = variable
192 for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) in do_test()
194 result |= test_in_one_mode (tests[i].s, tests[i].c, fe_tonearest, in do_test()
199 result |= test_in_one_mode (tests[i].s, tests[i].c, FE_DOWNWARD, in do_test()
207 result |= test_in_one_mode (tests[i].s, tests[i].c, FE_TOWARDZERO, in do_test()
215 result |= test_in_one_mode (tests[i].s, tests[i].c, FE_UPWARD, in do_test()
A Dtst-strfrom.h92 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) \
94 rc = FTOSTR (buf, tests[i].size, tests[i].fmt, tests[i].t.FSUF); \
95 rc1 = (strcmp (buf, tests[i].s) != 0) || (rc != tests[i].rc); \
99 buf, rc, tests[i].s, tests[i].rc); \
A Dtest-a64l.c33 static const struct a64l_test tests[] = variable
56 for (at = tests; at->base64 != NULL; ++at) in do_test()
A Dtst-strtod-round-skeleton.c295 for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) in do_test()
297 result |= test_in_one_mode (tests[i].s, &tests[i].r[modes[0].rnd_i], in do_test()
298 &tests[i].exact, &tests[i].o[modes[0].rnd_i], in do_test()
304 result |= test_in_one_mode (tests[i].s, &tests[i].r[m->rnd_i], in do_test()
305 &tests[i].exact, in do_test()
306 &tests[i].o[m->rnd_i], m->mode_name, in do_test()
A DMakefile95 tests-static := tst-secure-getenv
96 tests-container := tst-system
98 ifeq ($(build-hardcoded-path-in-tests),yes)
99 tests += tst-empty-env
120 tests-unsupported += tst-quick_exit tst-thread-quick_exit
127 tests += tst-putenv
140 tests-extras += tst-putenvmod
167 tests-special += $(objpfx)isomac.out
169 ifeq ($(run-built-tests),yes)
170 tests-special += $(objpfx)tst-fmtmsg.out
[all …]
A Dtst-strtod.c35 static const struct ltest tests[] = variable
93 for (lt = tests; lt->str != NULL; ++lt) in do_test()
101 lt->str, (unsigned int) (lt - tests)); in do_test()
A Dtst-strtoll.c19 static const struct ltest tests[] = variable
320 for (lt = tests; lt->str != NULL; ++lt) in do_test()
328 lt->str, lt->base, (unsigned int) (lt - tests)); in do_test()
361 lt->str, lt->base, (unsigned int) (lt - tests)); in do_test()
A Dtst-strtol.c19 static const struct ltest tests[] = variable
545 for (lt = tests; lt->str != NULL; ++lt) in do_test()
553 lt->str, lt->base, (unsigned int) (lt - tests)); in do_test()
586 lt->str, lt->base, (unsigned int) (lt - tests)); in do_test()
A Dtst-strfrom-locale.c21 static const struct test tests[] = { variable
A Dtst-strfrom.c21 static const struct test tests[] = { variable
A Dtst-strfmon_l.c152 static const struct locale_pair tests[] = variable
225 for (const struct locale_pair *test = tests; in do_test()
A Dtst-strtod-round-data.h2 static const struct test tests[] = { variable

Completed in 56 milliseconds