Skip to content

Commit

Permalink
Fixed 64 bit %p testcase, again
Browse files Browse the repository at this point in the history
  • Loading branch information
mpaland committed Nov 23, 2017
1 parent c355eaa commit f65dd08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,14 +977,14 @@ TEST_CASE("pointer", "[]" ) {
REQUIRE(!strcmp(buffer, "0000000012345678"));
}

if (sizeof(void*) == sizeof(long)) {
test::sprintf(buffer, "%p", (void*)(long)0xFFFFFFFFU);
REQUIRE(!strcmp(buffer, "FFFFFFFF"));
}
else {
if (sizeof(uintptr_t) == sizeof(long long)) {
test::sprintf(buffer, "%p", (void*)(unsigned long long)0xFFFFFFFFU);
REQUIRE(!strcmp(buffer, "00000000FFFFFFFF"));
}
else {
test::sprintf(buffer, "%p", (void*)(unsigned long)0xFFFFFFFFU);
REQUIRE(!strcmp(buffer, "FFFFFFFF"));
}
}


Expand Down

0 comments on commit f65dd08

Please sign in to comment.