1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 22:07:36 +00:00

Tests: Merge duplicate TestFormat test into AK directory

This commit is contained in:
Jelle Raaijmakers 2021-04-08 18:50:25 +02:00 committed by Andreas Kling
parent 18b3334738
commit 4bfd394384
4 changed files with 11 additions and 50 deletions

View file

@ -294,4 +294,15 @@ TEST_CASE(use_format_string_formatter)
EXPECT_EQ(String::formatted("{:*<10}", C { 42 }), "C(i=42)***");
}
TEST_CASE(long_long_regression)
{
EXPECT_EQ(String::formatted("{}", 0x0123456789abcdefLL), "81985529216486895");
StringBuilder builder;
AK::FormatBuilder fmtbuilder { builder };
fmtbuilder.put_i64(0x0123456789abcdefLL);
EXPECT_EQ(builder.string_view(), "81985529216486895");
}
TEST_MAIN(Format)