File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,16 +43,17 @@ TEST_CASE("formatter") {
43
43
44
44
// how is null handled by %s.
45
45
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
47
47
CHECK ( stringformat (" %s" , 0 ) == " 0" );
48
48
CHECK ( stringformat (" %s" , (const char *)0 ) == " (null)" );
49
49
50
50
// how is null handled by %p
51
51
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
53
53
CHECK ( stringformat (" %p" , 0 ) == " 0" );
54
54
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
56
57
// "%p", (..*)0 -->
57
58
// bsd, osx: 0x0
58
59
// win: 0000000000000000
You can’t perform that action at this time.
0 commit comments