Skip to content

Commit f65dd08

Browse files
committed
Fixed 64 bit %p testcase, again
1 parent c355eaa commit f65dd08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/test_suite.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -977,14 +977,14 @@ TEST_CASE("pointer", "[]" ) {
977977
REQUIRE(!strcmp(buffer, "0000000012345678"));
978978
}
979979

980-
if (sizeof(void*) == sizeof(long)) {
981-
test::sprintf(buffer, "%p", (void*)(long)0xFFFFFFFFU);
982-
REQUIRE(!strcmp(buffer, "FFFFFFFF"));
983-
}
984-
else {
980+
if (sizeof(uintptr_t) == sizeof(long long)) {
985981
test::sprintf(buffer, "%p", (void*)(unsigned long long)0xFFFFFFFFU);
986982
REQUIRE(!strcmp(buffer, "00000000FFFFFFFF"));
987983
}
984+
else {
985+
test::sprintf(buffer, "%p", (void*)(unsigned long)0xFFFFFFFFU);
986+
REQUIRE(!strcmp(buffer, "FFFFFFFF"));
987+
}
988988
}
989989

990990

0 commit comments

Comments
 (0)