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

Piggyback: AK: Add formatter for std::nullptr_t.

This commit is contained in:
asynts 2021-01-01 23:34:00 +01:00 committed by Andreas Kling
parent 4cfef0cd95
commit 632ff01e17
2 changed files with 16 additions and 0 deletions

View file

@ -269,4 +269,9 @@ TEST_CASE(yay_this_implementation_sucks)
EXPECT_EQ(String::formatted("{:.0}", .99999999999), "0.");
}
TEST_CASE(format_nullptr)
{
EXPECT_EQ(String::formatted("{}", nullptr), String::formatted("{:p}", static_cast<FlatPtr>(0)));
}
TEST_MAIN(Format)