mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Fix binary formatting for integers 2 and 3 (#1123)
This commit is contained in:
parent
74a85087de
commit
43885a76e4
2 changed files with 5 additions and 5 deletions
|
@ -40,13 +40,13 @@ TEST(FormatBinary64, test2) {
|
|||
}
|
||||
|
||||
TEST(FormatBinary64, test3) {
|
||||
EXPECT_EQ(3, FormatBinary64(buf, 1, 2) - buf);
|
||||
EXPECT_STREQ("0b1", buf);
|
||||
EXPECT_EQ(4, FormatBinary64(buf, 1, 2) - buf);
|
||||
EXPECT_STREQ("0b01", buf);
|
||||
}
|
||||
|
||||
TEST(FormatBinary64, test4) {
|
||||
EXPECT_EQ(1, FormatBinary64(buf, 1, 0) - buf);
|
||||
EXPECT_STREQ("1", buf);
|
||||
EXPECT_EQ(2, FormatBinary64(buf, 1, 0) - buf);
|
||||
EXPECT_STREQ("01", buf);
|
||||
}
|
||||
|
||||
TEST(FormatBinary64, test5) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue