mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 07:29:25 +00:00
Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
This commit is contained in:
parent
3b18d9e962
commit
805de43a3d
25 changed files with 112 additions and 101 deletions
|
@ -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]")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue