summaryrefslogtreecommitdiff
path: root/AK/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'AK/Tests')
-rw-r--r--AK/Tests/TestFormat.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/AK/Tests/TestFormat.cpp b/AK/Tests/TestFormat.cpp
index ea7fb5db19..7df8430b5e 100644
--- a/AK/Tests/TestFormat.cpp
+++ b/AK/Tests/TestFormat.cpp
@@ -182,4 +182,10 @@ TEST_CASE(ensure_that_format_works)
}
}
+TEST_CASE(format_string_literal_as_pointer)
+{
+ const char* literal = "abc";
+ EXPECT_EQ(String::formatted("{:p}", literal), String::formatted("{:p}", reinterpret_cast<FlatPtr>(literal)));
+}
+
TEST_MAIN(Format)