Lines Matching refs:TEST

13 #define TEST(r, f, x, m) ( \
31 TEST(l, atol("2147483647"), 2147483647L, "max 32bit signed %ld != %ld");
32 TEST(l, strtol("2147483647", 0, 0), 2147483647L, "max 32bit signed %ld != %ld");
33 TEST(ul, strtoul("4294967295", 0, 0), 4294967295UL, "max 32bit unsigned %lu != %lu");
36 TEST(l, strtol(s="2147483648", &c, 0), 2147483647L, "uncaught overflow %ld != %ld");
39 TEST(l, strtol(s="-2147483649", &c, 0), -2147483647L-1, "uncaught overflow %ld != %ld");
42 TEST(ul, strtoul(s="4294967296", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu");
45 TEST(ul, strtoul(s="-1", &c, 0), -1UL, "rejected negative %lu != %lu");
48 TEST(ul, strtoul(s="-2", &c, 0), -2UL, "rejected negative %lu != %lu");
51 TEST(ul, strtoul(s="-2147483648", &c, 0), -2147483648UL, "rejected negative %lu != %lu");
54 TEST(ul, strtoul(s="-2147483649", &c, 0), -2147483649UL, "rejected negative %lu != %lu");
57 TEST(ul, strtoul(s="-4294967296", &c, 0), 4294967295UL, "uncaught negative overflow %lu != %lu");
61 TEST(l, strtol(s="9223372036854775808", &c, 0), 9223372036854775807L, "uncaught overflow %ld != %ld");
64 TEST(l, strtol(s="-9223372036854775809", &c, 0), -9223372036854775807L-1, "uncaught overflow %ld != %ld");
67 TEST(ul, strtoul(s="18446744073709551616", &c, 0), 18446744073709551615UL, "uncaught overflow %lu != %lu");
70 TEST(ul, strtoul(s="-1", &c, 0), -1UL, "rejected negative %lu != %lu");
73 TEST(ul, strtoul(s="-2", &c, 0), -2UL, "rejected negative %lu != %lu");
76 TEST(ul, strtoul(s="-9223372036854775808", &c, 0), -9223372036854775808UL, "rejected negative %lu != %lu");
79 TEST(ul, strtoul(s="-9223372036854775809", &c, 0), -9223372036854775809UL, "rejected negative %lu != %lu");
82 TEST(ul, strtoul(s="-18446744073709551616", &c, 0), 18446744073709551615UL, "uncaught negative overflow %lu != %lu");
90 TEST(ll, strtoll(s="9223372036854775808", &c, 0), 9223372036854775807LL, "uncaught overflow %lld != %lld");
93 TEST(ll, strtoll(s="-9223372036854775809", &c, 0), -9223372036854775807LL-1, "uncaught overflow %lld != %lld");
96 TEST(ull, strtoull(s="18446744073709551616", &c, 0), 18446744073709551615ULL, "uncaught overflow %llu != %llu");
99 TEST(ull, strtoull(s="-1", &c, 0), -1ULL, "rejected negative %llu != %llu");
102 TEST(ull, strtoull(s="-2", &c, 0), -2ULL, "rejected negative %llu != %llu");
105 TEST(ull, strtoull(s="-9223372036854775808", &c, 0), -9223372036854775808ULL, "rejected negative %llu != %llu");
108 TEST(ull, strtoull(s="-9223372036854775809", &c, 0), -9223372036854775809ULL, "rejected negative %llu != %llu");
111 TEST(ull, strtoull(s="-18446744073709551616", &c, 0), 18446744073709551615ULL, "uncaught negative overflow %llu != %llu");
118 TEST(l, strtol("z", 0, 36), 35, "%ld != %ld");
119 TEST(l, strtol("00010010001101000101011001111000", 0, 2), 0x12345678, "%ld != %ld");
120 TEST(l, strtol(s="0F5F", &c, 16), 0x0f5f, "%ld != %ld");
122 TEST(l, strtol(s="0xz", &c, 16), 0, "%ld != %ld");
125 TEST(l, strtol(s="0x1234", &c, 16), 0x1234, "%ld != %ld");
129 TEST(l, strtol(s="123", &c, 37), 0, "%ld != %ld");
133 TEST(l, strtol(s=" 15437", &c, 8), 015437, "%ld != %ld");
136 TEST(l, strtol(s=" 1", &c, 0), 1, "%ld != %ld");