summaryrefslogtreecommitdiff
path: root/AK/Tests
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2020-10-07 12:47:35 +0200
committerAndreas Kling <kling@serenityos.org>2020-10-08 09:59:55 +0200
commitb94cb02a7fed5843dd81280f6e076798b31d87d1 (patch)
tree04a7a3910413553ad680e66e65f5abbcc74baa5e /AK/Tests
parentb9316474b7cd55531dff4d631be3e829a24a8fd2 (diff)
downloadserenity-b94cb02a7fed5843dd81280f6e076798b31d87d1.zip
AK+Format: Use pointer mode for pointers by default.
Diffstat (limited to 'AK/Tests')
-rw-r--r--AK/Tests/TestFormat.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/Tests/TestFormat.cpp b/AK/Tests/TestFormat.cpp
index 8e29659bef..0e7e9aae6a 100644
--- a/AK/Tests/TestFormat.cpp
+++ b/AK/Tests/TestFormat.cpp
@@ -156,9 +156,11 @@ TEST_CASE(pointers)
if (sizeof(void*) == 4) {
EXPECT_EQ(String::formatted("{:p}", 32), "0x00000020");
EXPECT_EQ(String::formatted("{:p}", ptr), "0x00004000");
+ EXPECT_EQ(String::formatted("{}", ptr), "0x00004000");
} else if (sizeof(void*) == 8) {
EXPECT_EQ(String::formatted("{:p}", 32), "0x0000000000000020");
EXPECT_EQ(String::formatted("{:p}", ptr), "0x0000000000004000");
+ EXPECT_EQ(String::formatted("{}", ptr), "0x0000000000004000");
} else {
ASSERT_NOT_REACHED();
}