Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
This commit is contained in:
1 parent
3b18d9e962
commit
805de43a3d
25 files changed
+112
-101
No files matched your search
@@ -124,13 +124,13 @@ TEST_CASE( "Sends stuff to stdout and stderr", "[.]" )
|
||||
|
||||
inline const char* makeString( bool makeNull )
|
||||
{
|
||||
return makeNull ? NULL : "valid string";
|
||||
return makeNull ? CATCH_NULL : "valid string";
|
||||
}
|
||||
|
||||
TEST_CASE( "null strings", "" )
|
||||
{
|
||||
REQUIRE( makeString( false ) != static_cast<char*>(NULL));
|
||||
REQUIRE( makeString( true ) == static_cast<char*>(NULL));
|
||||
REQUIRE( makeString( false ) != static_cast<char*>(CATCH_NULL));
|
||||
REQUIRE( makeString( true ) == static_cast<char*>(CATCH_NULL));
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ TEST_CASE("Equals string matcher", "[.][failing][matchers]")
|
||||
}
|
||||
TEST_CASE("Equals string matcher, with NULL", "[matchers]")
|
||||
{
|
||||
REQUIRE_THAT("", Equals(NULL));
|
||||
REQUIRE_THAT("", Equals(CATCH_NULL));
|
||||
}
|
||||
TEST_CASE("AllOf matcher", "[matchers]")
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user