mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-15 03:35:39 +02:00
Add tests for comparing & stringifying volatile pointers
This commit is contained in:
@@ -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