mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 14:52:28 +00:00
Get GNU MPFR and MPC tests to pass
This change fixes more issues with our scanf() function.
This commit is contained in:
parent
63a1636e1f
commit
6ef2a471e4
37 changed files with 389 additions and 865 deletions
|
@ -48,26 +48,6 @@ TEST(FormatUint64, test) {
|
|||
EXPECT_STREQ("9223372036854775808", buf);
|
||||
}
|
||||
|
||||
TEST(int128toarray_radix10, test) {
|
||||
char buf[41];
|
||||
EXPECT_EQ(1, int128toarray_radix10(0, buf));
|
||||
EXPECT_STREQ("0", buf);
|
||||
EXPECT_EQ(39, int128toarray_radix10(INT128_MAX, buf));
|
||||
EXPECT_STREQ("170141183460469231731687303715884105727", buf);
|
||||
EXPECT_EQ(40, int128toarray_radix10(INT128_MIN, buf));
|
||||
EXPECT_STREQ("-170141183460469231731687303715884105728", buf);
|
||||
}
|
||||
|
||||
TEST(uint128toarray_radix10, test) {
|
||||
char buf[40];
|
||||
EXPECT_EQ(1, uint128toarray_radix10(0, buf));
|
||||
EXPECT_STREQ("0", buf);
|
||||
EXPECT_EQ(39, uint128toarray_radix10(UINT128_MAX, buf));
|
||||
EXPECT_STREQ("340282366920938463463374607431768211455", buf);
|
||||
EXPECT_EQ(39, uint128toarray_radix10(INT128_MIN, buf));
|
||||
EXPECT_STREQ("170141183460469231731687303715884105728", buf);
|
||||
}
|
||||
|
||||
BENCH(itoa64radix10, bench) {
|
||||
char b[21];
|
||||
EZBENCH2("itoa64radix10", donothing, FormatUint64(b, UINT64_MAX));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue