Add test for comparing pointers to NULL with !=

This commit is contained in:
Martin Hořeňovský 2022-11-01 21:38:46 +01:00
parent 0a1b0ae9d1
commit b3dbd83da2
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 4 additions and 2 deletions

View File

@ -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 );
}