From b3dbd83da2f793a8630647e0053b6613ba5fb874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 1 Nov 2022 21:38:46 +0100 Subject: [PATCH] Add test for comparing pointers to NULL with != --- 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 ); }