mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-05 17:30:27 +00:00
restore neghex test, but with strtoul instead
This commit is contained in:
parent
b2840c0415
commit
6ec86777cc
1 changed files with 6 additions and 0 deletions
|
@ -58,6 +58,12 @@ TEST(strtoimax, testTwosBane) {
|
||||||
strtoimax("0x80000000000000000000000000000000", NULL, 0));
|
strtoimax("0x80000000000000000000000000000000", NULL, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(strtoul, neghex) {
|
||||||
|
errno = 0;
|
||||||
|
ASSERT_EQ(-16, (long) strtoul("0xfffffffffffffff0", NULL, 0));
|
||||||
|
EXPECT_EQ(0, errno);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(strtol, testOutsideLimit) {
|
TEST(strtol, testOutsideLimit) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
EXPECT_EQ(0x7fffffffffffffff, strtol("0x8000000000000000", NULL, 0));
|
EXPECT_EQ(0x7fffffffffffffff, strtol("0x8000000000000000", NULL, 0));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue