mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-04 11:44:08 +02:00
Fix large shift in uint128_fallback
This commit is contained in:
+3
-1
@@ -59,6 +59,8 @@ TEST(uint128_test, shift) {
|
||||
EXPECT_EQ(static_cast<uint64_t>(n), 0x8000000000000000);
|
||||
n = n >> 62;
|
||||
EXPECT_EQ(static_cast<uint64_t>(n), 42);
|
||||
EXPECT_EQ(uint128_fallback(1) << 112, uint128_fallback(0x1000000000000, 0));
|
||||
EXPECT_EQ(uint128_fallback(0x1000000000000, 0) >> 112, uint128_fallback(1));
|
||||
}
|
||||
|
||||
TEST(uint128_test, minus) {
|
||||
@@ -234,7 +236,7 @@ TEST(util_test, format_system_error) {
|
||||
throws_on_alloc = true;
|
||||
}
|
||||
if (!throws_on_alloc) {
|
||||
fmt::print("warning: std::allocator allocates {} chars", max_size);
|
||||
fmt::print("warning: std::allocator allocates {} chars\n", max_size);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user