Skip to content

Commit c65e194

Browse files
committed
formatter: %p has different results on all platforms -> disabled test
1 parent 2531aa6 commit c65e194

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test-formatter.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,17 @@ TEST_CASE("formatter") {
4343

4444
// how is null handled by %s.
4545
CHECK( stringformat("%s", nullptr) == "(null)");
46-
CHECK( stringformat("%s", NULL) == "0"); // bsd: (null)
46+
//CHECK( stringformat("%s", NULL) == "0"); // bsd: (null) <-- bad test: platform dependent
4747
CHECK( stringformat("%s", 0) == "0");
4848
CHECK( stringformat("%s", (const char*)0) == "(null)");
4949

5050
// how is null handled by %p
5151
CHECK( stringformat("%p", nullptr) == "nullptr");
52-
CHECK( stringformat("%p", NULL) == "0"); // bsd: nullptr
52+
//CHECK( stringformat("%p", NULL) == "0"); // bsd: nullptr <-- bad test: platform dependent
5353
CHECK( stringformat("%p", 0) == "0");
5454

55-
CHECK( stringformat("%p", (const char*)0) == "0");
55+
//CHECK( stringformat("%p", (const char*)0) == "0");
56+
// not a good test: different result for all platforms
5657
// "%p", (..*)0 -->
5758
// bsd, osx: 0x0
5859
// win: 0000000000000000

0 commit comments

Comments
 (0)