summaryrefslogtreecommitdiff
path: root/wcstol.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcstol.c')
-rw-r--r--wcstol.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/wcstol.c b/wcstol.c
index 07113df..bab5ade 100644
--- a/wcstol.c
+++ b/wcstol.c
@@ -40,21 +40,21 @@ int test_wcstol(void)
TEST2(i, c-s, 10, "wrong final position %d != %d");
TEST2(i, errno, ERANGE, "missing errno %d != %d");
errno = 0;
- TEST(ul, wcstoul(s=L"-1", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu");
+ TEST(ul, wcstoul(s=L"-1", &c, 0), -1UL, "rejected negative %lu != %lu");
TEST2(i, c-s, 2, "wrong final position %d != %d");
- TEST2(i, errno, ERANGE, "missing errno %d != %d");
+ TEST2(i, errno, 0, "spurious errno %d != %d");
errno = 0;
- TEST(ul, wcstoul(s=L"-2", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu");
+ TEST(ul, wcstoul(s=L"-2", &c, 0), -2UL, "rejected negative %lu != %lu");
TEST2(i, c-s, 2, "wrong final position %d != %d");
- TEST2(i, errno, ERANGE, "missing errno %d != %d");
+ TEST2(i, errno, 0, "spurious errno %d != %d");
errno = 0;
- TEST(ul, wcstoul(s=L"-2147483648", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu");
+ TEST(ul, wcstoul(s=L"-2147483648", &c, 0), -2147483648UL, "rejected negative %lu != %lu");
TEST2(i, c-s, 11, "wrong final position %d != %d");
- TEST2(i, errno, ERANGE, "missing errno %d != %d");
+ TEST2(i, errno, 0, "spurious errno %d != %d");
errno = 0;
- TEST(ul, wcstoul(s=L"-2147483649", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu");
+ TEST(ul, wcstoul(s=L"-2147483649", &c, 0), -2147483649UL, "rejected negative %lu != %lu");
TEST2(i, c-s, 11, "wrong final position %d != %d");
- TEST2(i, errno, ERANGE, "missing errno %d != %d");
+ TEST2(i, errno, 0, "spurious errno %d != %d");
} else {
TEST(i, 0, 1, "64bit tests not implemented");
}