mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
This commit is contained in:
@@ -973,51 +973,51 @@ ConditionTests.cpp:<line number>
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( p == __null )
|
||||
REQUIRE( p == nullptr )
|
||||
with expansion:
|
||||
__null == 0
|
||||
NULL == nullptr
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( p == pNULL )
|
||||
with expansion:
|
||||
__null == __null
|
||||
NULL == NULL
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( p != __null )
|
||||
REQUIRE( p != nullptr )
|
||||
with expansion:
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( cp != __null )
|
||||
REQUIRE( cp != nullptr )
|
||||
with expansion:
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( cpc != __null )
|
||||
REQUIRE( cpc != nullptr )
|
||||
with expansion:
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( returnsNull() == __null )
|
||||
REQUIRE( returnsNull() == nullptr )
|
||||
with expansion:
|
||||
{null string} == 0
|
||||
{null string} == nullptr
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( returnsConstNull() == __null )
|
||||
REQUIRE( returnsConstNull() == nullptr )
|
||||
with expansion:
|
||||
{null string} == 0
|
||||
{null string} == nullptr
|
||||
|
||||
ConditionTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( __null != p )
|
||||
REQUIRE( nullptr != p )
|
||||
with expansion:
|
||||
0 != 0x<hex digits>
|
||||
nullptr != 0x<hex digits>
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
'Not' checks that should succeed
|
||||
@@ -3113,13 +3113,13 @@ MiscTests.cpp:<line number>
|
||||
|
||||
MiscTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( makeString( false ) != static_cast<char*>(__null) )
|
||||
REQUIRE( makeString( false ) != static_cast<char*>(nullptr) )
|
||||
with expansion:
|
||||
"valid string" != {null string}
|
||||
|
||||
MiscTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( makeString( true ) == static_cast<char*>(__null) )
|
||||
REQUIRE( makeString( true ) == static_cast<char*>(nullptr) )
|
||||
with expansion:
|
||||
{null string} == {null string}
|
||||
|
||||
@@ -3316,7 +3316,7 @@ MiscTests.cpp:<line number>
|
||||
|
||||
MiscTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE_THAT( "" Equals(__null) )
|
||||
REQUIRE_THAT( "" Equals(nullptr) )
|
||||
with expansion:
|
||||
"" equals: ""
|
||||
|
||||
@@ -5863,9 +5863,9 @@ TrickyTests.cpp:<line number>
|
||||
|
||||
TrickyTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( obj.prop != __null )
|
||||
REQUIRE( obj.prop != nullptr )
|
||||
with expansion:
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
(unimplemented) static bools can be evaluated
|
||||
@@ -6106,7 +6106,7 @@ TrickyTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( p == 0 )
|
||||
with expansion:
|
||||
__null == 0
|
||||
NULL == 0
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
null_ptr
|
||||
@@ -6118,7 +6118,7 @@ TrickyTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( ptr.get() == nullptr )
|
||||
with expansion:
|
||||
__null == nullptr
|
||||
NULL == nullptr
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
X/level/0/a
|
||||
|
@@ -1205,10 +1205,10 @@
|
||||
<TestCase name="Pointers can be compared to null">
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
<Original>
|
||||
p == __null
|
||||
p == nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
__null == 0
|
||||
NULL == nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -1216,55 +1216,55 @@
|
||||
p == pNULL
|
||||
</Original>
|
||||
<Expanded>
|
||||
__null == __null
|
||||
NULL == NULL
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
<Original>
|
||||
p != __null
|
||||
p != nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
<Original>
|
||||
cp != __null
|
||||
cp != nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
<Original>
|
||||
cpc != __null
|
||||
cpc != nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
<Original>
|
||||
returnsNull() == __null
|
||||
returnsNull() == nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
{null string} == 0
|
||||
{null string} == nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
<Original>
|
||||
returnsConstNull() == __null
|
||||
returnsConstNull() == nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
{null string} == 0
|
||||
{null string} == nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/ConditionTests.cpp" >
|
||||
<Original>
|
||||
__null != p
|
||||
nullptr != p
|
||||
</Original>
|
||||
<Expanded>
|
||||
0 != 0x<hex digits>
|
||||
nullptr != 0x<hex digits>
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -3226,7 +3226,7 @@
|
||||
<TestCase name="null strings">
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/MiscTests.cpp" >
|
||||
<Original>
|
||||
makeString( false ) != static_cast<char*>(__null)
|
||||
makeString( false ) != static_cast<char*>(nullptr)
|
||||
</Original>
|
||||
<Expanded>
|
||||
"valid string" != {null string}
|
||||
@@ -3234,7 +3234,7 @@
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/MiscTests.cpp" >
|
||||
<Original>
|
||||
makeString( true ) == static_cast<char*>(__null)
|
||||
makeString( true ) == static_cast<char*>(nullptr)
|
||||
</Original>
|
||||
<Expanded>
|
||||
{null string} == {null string}
|
||||
@@ -3434,7 +3434,7 @@
|
||||
<TestCase name="Equals string matcher, with NULL">
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="projects/SelfTest/MiscTests.cpp" >
|
||||
<Original>
|
||||
"" Equals(__null)
|
||||
"" Equals(nullptr)
|
||||
</Original>
|
||||
<Expanded>
|
||||
"" equals: ""
|
||||
@@ -6041,10 +6041,10 @@ there"
|
||||
<TestCase name="boolean member">
|
||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/TrickyTests.cpp" >
|
||||
<Original>
|
||||
obj.prop != __null
|
||||
obj.prop != nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
0x<hex digits> != 0
|
||||
0x<hex digits> != nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -6270,7 +6270,7 @@ there"
|
||||
p == 0
|
||||
</Original>
|
||||
<Expanded>
|
||||
__null == 0
|
||||
NULL == 0
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -6281,7 +6281,7 @@ there"
|
||||
ptr.get() == nullptr
|
||||
</Original>
|
||||
<Expanded>
|
||||
__null == nullptr
|
||||
NULL == nullptr
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
|
Reference in New Issue
Block a user