mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 06:42:27 +00:00
Set errno when out of range in strtoimax (#111)
This commit is contained in:
parent
f5da4efcaf
commit
8a6ac6dd63
5 changed files with 29 additions and 5 deletions
|
@ -46,3 +46,8 @@ TEST(strtoumax, testMaximum) {
|
|||
EXPECT_EQ(UINTMAX_MAX,
|
||||
strtoumax("0xffffffffffffffffffffffffffffffff", NULL, 0));
|
||||
}
|
||||
|
||||
TEST(strtoumax, testTwosBane) {
|
||||
EXPECT_EQ(((uintmax_t)0x8000000000000000) << 64 | 0x0000000000000000,
|
||||
strtoumax("0x80000000000000000000000000000000", NULL, 0));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue