catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Add test for comparing pointers to NULL with !=
- Commit
b3dbd83da2f793a8630647e0053b6613ba5fb874- Author
- Martin Hořeňovský ·
- Parents
0a1b0ae9d1a1
Changes
tests/SelfTest/UsageTests/Decomposition.tests.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/SelfTest/UsageTests/Decomposition.tests.cpp b/tests/SelfTest/UsageTests/Decomposition.tests.cpp index 44efa234..e92f7406 100644 --- a/tests/SelfTest/UsageTests/Decomposition.tests.cpp +++ b/tests/SelfTest/UsageTests/Decomposition.tests.cpp @@ -34,6 +34,8 @@ TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decompo TEST_CASE("#1005: Comparing pointer to int and long (NULL can be either on various systems)", "[Decomposition][approvals]") { FILE* fptr = nullptr; - REQUIRE(fptr == 0); - REQUIRE(fptr == 0l); + REQUIRE( fptr == 0 ); + REQUIRE_FALSE( fptr != 0 ); + REQUIRE( fptr == 0l ); + REQUIRE_FALSE( fptr != 0l ); }