diff options
author | asynts <asynts@gmail.com> | 2021-01-01 23:34:00 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-02 01:37:22 +0100 |
commit | 632ff01e174f4efc0da6dc9f2170932a3c400fde (patch) | |
tree | 6a8d9ccda80839ee2ba656f5a0730cadc8087257 /AK/Tests | |
parent | 4cfef0cd95b3aa8d3bc94c8b59063f1dc0fd0b10 (diff) | |
download | serenity-632ff01e174f4efc0da6dc9f2170932a3c400fde.zip |
Piggyback: AK: Add formatter for std::nullptr_t.
Diffstat (limited to 'AK/Tests')
-rw-r--r-- | AK/Tests/TestFormat.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/AK/Tests/TestFormat.cpp b/AK/Tests/TestFormat.cpp index bcf9b91889..cfe7fe2950 100644 --- a/AK/Tests/TestFormat.cpp +++ b/AK/Tests/TestFormat.cpp @@ -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) |