diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_suite.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_suite.cpp b/test/test_suite.cpp index 910ed91..568c2a1 100644 --- a/test/test_suite.cpp +++ b/test/test_suite.cpp @@ -977,11 +977,12 @@ TEST_CASE("pointer", "[]" ) { REQUIRE(!strcmp(buffer, "0000000012345678"));
}
- test::sprintf(buffer, "%p", (void*)0xFFFFFFFFLU);
- if (sizeof(void*) == 4U) {
+ if (sizeof(void*) == sizeof(long)) {
+ test::sprintf(buffer, "%p", (void*)(long)0xFFFFFFFFU);
REQUIRE(!strcmp(buffer, "FFFFFFFF"));
}
else {
+ test::sprintf(buffer, "%p", (void*)(unsigned long long)0xFFFFFFFFU);
REQUIRE(!strcmp(buffer, "00000000FFFFFFFF"));
}
}
|