Add tests for comparing & stringifying volatile pointers
This commit is contained in:
18 files changed
+282
-18
No files matched your search
@@ -562,3 +562,15 @@ TEST_CASE("Validate SEH behavior - no crash for stack unwinding", "[approvals][!
|
||||
}
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
TEST_CASE( "Comparing (and stringifying) volatile pointers works",
|
||||
"[volatile]" ) {
|
||||
volatile int* ptr = nullptr;
|
||||
REQUIRE_FALSE( ptr );
|
||||
REQUIRE( ptr == ptr );
|
||||
REQUIRE_FALSE( ptr != ptr );
|
||||
REQUIRE_FALSE( ptr < ptr );
|
||||
REQUIRE( ptr <= ptr );
|
||||
REQUIRE_FALSE( ptr > ptr );
|
||||
REQUIRE( ptr >= ptr );
|
||||
}
|
||||
Reference in new issue
Block a user