/picolibc-latest/test/libc-testsuite/ |
D | string.c | 39 #define TEST(r, f, x, m) do { \ macro 64 TEST(s, strcpy(b, c), b, "wrong return %p != %p"); in test_string() 66 TEST(s, strcpy(b+1, c), b+1, "wrong return %p != %p"); in test_string() 68 TEST(s, strcpy(b+2, c), b+2, "wrong return %p != %p"); in test_string() 70 TEST(s, strcpy(b+3, c), b+3, "wrong return %p != %p"); in test_string() 73 TEST(s, strcpy(b+1, c+1), b+1, "wrong return %p != %p"); in test_string() 75 TEST(s, strcpy(b+2, c+2), b+2, "wrong return %p != %p"); in test_string() 77 TEST(s, strcpy(b+3, c+3), b+3, "wrong return %p != %p"); in test_string() 80 TEST(s, memset(b, 'x', sizeof b), b, "wrong return %p != %p"); in test_string() 81 TEST(s, strncpy(b, "abc", sizeof b - 1), b, "wrong return %p != %p"); in test_string() [all …]
|
D | sscanf.c | 31 #define TEST(r, f, x, m) ( \ macro 44 TEST(i, sscanf(# x, "%lf", &d), 1, "got %d fields, expected %d"), \ 45 TEST(t, d, (double)x, "%a != %a") ) 48 TEST(i, sscanf(v, "%lf", &d), 1, "got %d fields, expected %d"), \ 49 TEST(t, d, (double)x, "%a != %a") ) 95 TEST(i, sscanf("hello, world\n", "%s %s", a, b), 2, "only %d fields, expected %d"); in test_sscanf() 102 TEST(i, sscanf("hello, world\n", "%6c %5c%c", a, b, c), 3, "only %d fields, expected %d"); in test_sscanf() 107 TEST(i, sscanf("hello, world\n", "%[hel]%s", a, b), 2, "only %d fields, expected %d"); in test_sscanf() 111 TEST(i, sscanf("hello, world\n", "%[hel] %s", a, b), 2, "only %d fields, expected %d"); in test_sscanf() 115 TEST(i, sscanf("elloworld", "%1[abcdefg]%s", a, b), 2, "only %d fields, expected %d"); in test_sscanf() [all …]
|
D | strtol.c | 39 #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 …]
|
D | snprintf.c | 40 #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() 208 TEST(i, snprintf(b, sizeof b, "%d%n456", n, &len), 6, "length for %n"); in test_snprintf() 210 TEST(i, len, 3, "incorrect len"); in test_snprintf() [all …]
|
D | dirname.c | 30 #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()
|
D | basename.c | 30 #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()
|
D | strtod.c | 39 #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-latest/test/ |
D | math_errhandling_tests.c | 83 #define TEST(n,v,ex,er) { .func = makemathname(cat2(test_, n)), .name = str(n), .value = (v), .exce… macro 819 TEST(acos_2, (FLOAT_T) NAN, FE_INVALID, EDOM), 820 TEST(acos_qnan, (FLOAT_T) NAN, 0, 0), 821 TEST(acos_snan, (FLOAT_T) NAN, FE_INVALID, 0), 822 TEST(acos_inf, (FLOAT_T) NAN, FE_INVALID, EDOM), 823 TEST(acos_minf, (FLOAT_T) NAN, FE_INVALID, EDOM), 825 TEST(acosh_half, (FLOAT_T)NAN, FE_INVALID, EDOM), 826 TEST(acosh_qnan, (FLOAT_T)NAN, 0, 0), 827 TEST(acosh_snan, (FLOAT_T)NAN, FE_INVALID, 0), 828 TEST(acosh_inf, (FLOAT_T)INFINITY, 0, 0), [all …]
|
D | test-ctype.c | 44 #define TEST(name) do { \ macro 75 TEST(alnum); in main() 76 TEST(alpha); in main() 77 TEST(blank); in main() 78 TEST(cntrl); in main() 79 TEST(digit); in main() 80 TEST(graph); in main() 81 TEST(lower); in main() 82 TEST(print); in main() 83 TEST(punct); in main() [all …]
|
/picolibc-latest/newlib/testsuite/newlib.search/ |
D | hsearchtest.c | 41 #define TEST(e) ((e) ? (void)0 : testfail(__FILE__, __LINE__, #e)) macro 61 TEST(created_ok); in main() 70 TEST(e.key != NULL); in main() 73 TEST(ep != NULL); in main() 74 TEST(strcmp(ep->key, ch) == 0); in main() 75 TEST((int) (uintptr_t)ep->data == i); in main() 85 TEST(ep != NULL); in main() 86 TEST(strcmp(ep->key, ch) == 0); in main() 87 TEST((int) (uintptr_t)ep->data == i); in main() 94 TEST(ep != NULL); in main() [all …]
|
/picolibc-latest/.github/ |
D | do-build | 14 TEST="test" 56 ninja $TEST || exit 1) || exit 1
|
/picolibc-latest/newlib/libc/machine/w65/ |
D | divsi3.c | 135 #ifdef TEST
|
/picolibc-latest/newlib/libc/machine/h8500/ |
D | divsi3.c | 135 #ifdef TEST
|