Progmasoft Git

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

Cleaned up some of the contributed tests

Commit
0f2e5d65b77dbcab9909635d951f45f63bf272bc
Author
Phil Nash ·
Parents
0f478a5b10b2

Files · Download .tar.gz

Changes

 Test/TrickyTests.cpp | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/Test/TrickyTests.cpp b/Test/TrickyTests.cpp
index 1fc50876..fb4c66e1 100644
--- a/Test/TrickyTests.cpp
+++ b/Test/TrickyTests.cpp
@@ -178,13 +178,9 @@ namespace ObjectWithConversions
         "./succeeding/koenig",
         "Operators at different namespace levels not hijacked by Koenig lookup"
     )
-    {
-        
-        Object o;
-        
-        bool ok = (0xc0000000 == o); // ok
-        REQUIRE(ok);
-        REQUIRE(0xc0000000 == o );	// doesn't compile (VC or GCC)
+    {        
+        Object o;        
+        REQUIRE(0xc0000000 == o );
     }
 }
 
@@ -210,10 +206,7 @@ namespace ObjectWithNonConstEqualityOperator
     TEST_CASE("./succeeding/non-const==", "Demonstrate that a non-const == is not used")
     {
         Test t( 1 );
-        
-        bool ok = (t == 1); // ok
-        REQUIRE(ok);	
-        REQUIRE( t == 1 );	// doesn't compile (VC or GCC)
+        REQUIRE( t == 1 );
     }
 }
 
@@ -228,3 +221,17 @@ namespace EnumBitFieldTests
         REQUIRE( 0xc0000000 == bit30and31 );
     }
 }
+
+struct Obj
+{
+    Obj():prop(&p){}
+    
+    int p;
+    int* prop;
+};
+
+TEST_CASE("./succeeding/boolean member", "")
+{
+    Obj obj;
+    REQUIRE( obj.prop );
+}