1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:37:35 +00:00

AK+Format: Use pointer mode for pointers by default.

This commit is contained in:
asynts 2020-10-07 12:47:35 +02:00 committed by Andreas Kling
parent b9316474b7
commit b94cb02a7f
2 changed files with 5 additions and 0 deletions

View file

@ -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();
}