Home
last modified time | relevance | path

Searched refs:TEST (Results 1 – 11 of 11) sorted by relevance

/picolibc-3.7.0-3.6.0/test/libc-testsuite/
Dstring.c39 #define TEST(r, f, x, m) do { \ macro
63 TEST(s, strcpy(b, b+16), b, "wrong return %p != %p"); in test_string()
65 TEST(s, strcpy(b+1, b+16), b+1, "wrong return %p != %p"); in test_string()
67 TEST(s, strcpy(b+2, b+16), b+2, "wrong return %p != %p"); in test_string()
69 TEST(s, strcpy(b+3, b+16), b+3, "wrong return %p != %p"); in test_string()
72 TEST(s, strcpy(b+1, b+17), b+1, "wrong return %p != %p"); in test_string()
74 TEST(s, strcpy(b+2, b+18), b+2, "wrong return %p != %p"); in test_string()
76 TEST(s, strcpy(b+3, b+19), b+3, "wrong return %p != %p"); in test_string()
79 TEST(s, memset(b, 'x', sizeof b), b, "wrong return %p != %p"); in test_string()
80 TEST(s, strncpy(b, "abc", sizeof b - 1), b, "wrong return %p != %p"); in test_string()
[all …]
Dsscanf.c28 #define TEST(r, f, x, m) ( \ macro
37 TEST(i, sscanf(# x, "%lf", &d), 1, "got %d fields, expected %d"), \
38 TEST(t, d, (double)x, "%g != %g") )
63 TEST(i, sscanf("hello, world\n", "%s %s", a, b), 2, "only %d fields, expected %d"); in test_sscanf()
67 TEST(i, sscanf("hello, world\n", "%[hel]%s", a, b), 2, "only %d fields, expected %d"); in test_sscanf()
71 TEST(i, sscanf("hello, world\n", "%[hel] %s", a, b), 2, "only %d fields, expected %d"); in test_sscanf()
79 TEST(i, sscanf("hello, world\n", "%8c%8c", a, b), 1, "%d fields, expected %d"); in test_sscanf()
83TEST(i, sscanf("56789 0123 56a72", "%2d%d%*d %[0123456789]\n", &x, &y, a), 3, "only %d fields, exp… in test_sscanf()
84 TEST(i, x, 56, "%d != %d"); in test_sscanf()
85 TEST(i, y, 789, "%d != %d"); in test_sscanf()
[all …]
Dstrtol.c39 #define TEST(r, f, x, m) ( \ macro
60 TEST(l, atol("2147483647"), 2147483647L, "max 32bit signed %ld != %ld"); in test_strtol()
62 TEST(l, strtol("2147483647", 0, 0), 2147483647L, "max 32bit signed %ld != %ld"); in test_strtol()
63 TEST(ul, strtoul("4294967295", 0, 0), 4294967295UL, "max 32bit unsigned %lu != %lu"); in test_strtol()
67 TEST(l, strtol(s="2147483648", &c, 0), 2147483647L, "uncaught overflow %ld != %ld"); in test_strtol()
71 TEST(l, strtol(s="-2147483649", &c, 0), -2147483647L-1, "uncaught overflow %ld != %ld"); in test_strtol()
75 TEST(ul, strtoul(s="4294967296", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu"); in test_strtol()
79 TEST(ul, strtoul(s="-1", &c, 0), -1UL, "rejected negative %lu != %lu"); in test_strtol()
83 TEST(ul, strtoul(s="-2", &c, 0), -2UL, "rejected negative %lu != %lu"); in test_strtol()
87 TEST(ul, strtoul(s="-2147483648", &c, 0), -2147483648UL, "rejected negative %lu != %lu"); in test_strtol()
[all …]
Ddirname.c30 #define TEST(p, b) do { \ macro
51 TEST("", "."); in test_dirname()
52 TEST("/usr/lib", "/usr"); in test_dirname()
53 TEST("/usr/", "/"); in test_dirname()
54 TEST("usr", "."); in test_dirname()
55 TEST("/", "/"); in test_dirname()
56 TEST("///", "/"); in test_dirname()
57 TEST(".", "."); in test_dirname()
58 TEST("..", "."); in test_dirname()
Dbasename.c30 #define TEST(p, b) do { \ macro
51 TEST("", "."); in test_basename()
52 TEST("/usr/lib", "lib"); in test_basename()
53 TEST("/usr/", "usr"); in test_basename()
54 TEST("/", "/"); in test_basename()
55 TEST("///", "/"); in test_basename()
56 TEST("//usr//lib//", "lib"); in test_basename()
Dsnprintf.c40 #define TEST(r, f, x, m) ( \ macro
173 TEST(i, snprintf(0, 0, "%ld", 123456l), 6, "length returned %d != %d"); in test_snprintf()
174 TEST(i, snprintf(0, 0, "%.4s", "hello"), 4, "length returned %d != %d"); in test_snprintf()
175 TEST(i, snprintf(b, 0, "%.0s", "goodbye"), 0, "length returned %d != %d"); in test_snprintf()
178 TEST(i, snprintf(b, 4, "%ld", 123456l), 6, "length returned %d != %d"); in test_snprintf()
180 TEST(i, b[5], 'x', "buffer overrun"); in test_snprintf()
185 TEST(i, snprintf(b, sizeof b, "%.1022f", 0x1p-1021), 1024, "%d != %d"); in test_snprintf()
193 TEST(i, b[1], '1', "'%c' != '%c'"); in test_snprintf()
203 TEST(i, snprintf(NULL, 0, "%.*u", 2147483647, 0), 2147483647, "cannot print max length %d"); in test_snprintf()
209TEST(i, snprintf(b, sizeof b, int_tests[j].fmt, int_tests[j].i), (int) strlen(b), "%d != %d"); in test_snprintf()
[all …]
Dstrtod.c39 #define TEST(r, f, x, m) ( \ macro
59 TEST(d2, strtod(buf, 0), d, "round trip fail %a != %a (%a)"); in test_strtod()
65 TEST(d, strtod("0x1p4", 0), 16.0, "hex float %a != %a"); in test_strtod()
66 TEST(d, strtod("0x1.1p4", 0), 17.0, "hex float %a != %a"); in test_strtod()
/picolibc-3.7.0-3.6.0/test/
Dmath_errhandling_tests.c83 #define TEST(n,v,ex,er) { .func = makemathname(cat2(test_, n)), .name = str(n), .value = (v), .exce… macro
791 TEST(acos_2, (FLOAT_T) NAN, FE_INVALID, EDOM),
792 TEST(acos_qnan, (FLOAT_T) NAN, 0, 0),
793 TEST(acos_snan, (FLOAT_T) NAN, FE_INVALID, 0),
794 TEST(acos_inf, (FLOAT_T) NAN, FE_INVALID, EDOM),
795 TEST(acos_minf, (FLOAT_T) NAN, FE_INVALID, EDOM),
797 TEST(acosh_half, (FLOAT_T)NAN, FE_INVALID, EDOM),
798 TEST(acosh_qnan, (FLOAT_T)NAN, 0, 0),
799 TEST(acosh_snan, (FLOAT_T)NAN, FE_INVALID, 0),
800 TEST(acosh_inf, (FLOAT_T)INFINITY, 0, 0),
[all …]
/picolibc-3.7.0-3.6.0/newlib/testsuite/newlib.search/
Dhsearchtest.c50 #define TEST(e) ((e) ? (void)0 : testfail(__FILE__, __LINE__, #e)) macro
70 TEST(created_ok); in main()
79 TEST(e.key != NULL); in main()
82 TEST(ep != NULL); in main()
83 TEST(strcmp(ep->key, ch) == 0); in main()
84 TEST((int) (uintptr_t)ep->data == i); in main()
94 TEST(ep != NULL); in main()
95 TEST(strcmp(ep->key, ch) == 0); in main()
96 TEST((int) (uintptr_t)ep->data == i); in main()
103 TEST(ep != NULL); in main()
[all …]
/picolibc-3.7.0-3.6.0/newlib/libc/machine/w65/
Ddivsi3.c131 #ifdef TEST
/picolibc-3.7.0-3.6.0/newlib/libc/machine/h8500/
Ddivsi3.c131 #ifdef TEST