summaryrefslogtreecommitdiff
path: root/AK/Tests/TestFormat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AK/Tests/TestFormat.cpp')
-rw-r--r--AK/Tests/TestFormat.cpp5
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)