restore neghex test, but with strtoul instead

This commit is contained in:
Alison Winters 2021-03-07 20:36:00 +00:00
parent b2840c0415
commit 6ec86777cc

View file

@ -58,6 +58,12 @@ TEST(strtoimax, testTwosBane) {
strtoimax("0x80000000000000000000000000000000", NULL, 0));
}
TEST(strtoul, neghex) {
errno = 0;
ASSERT_EQ(-16, (long) strtoul("0xfffffffffffffff0", NULL, 0));
EXPECT_EQ(0, errno);
}
TEST(strtol, testOutsideLimit) {
errno = 0;
EXPECT_EQ(0x7fffffffffffffff, strtol("0x8000000000000000", NULL, 0));