mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +01:00 
			
		
		
		
	Cleaned up some of the contributed tests
This commit is contained in:
		@@ -178,13 +178,9 @@ namespace ObjectWithConversions
 | 
				
			|||||||
        "./succeeding/koenig",
 | 
					        "./succeeding/koenig",
 | 
				
			||||||
        "Operators at different namespace levels not hijacked by Koenig lookup"
 | 
					        "Operators at different namespace levels not hijacked by Koenig lookup"
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    {
 | 
					    {        
 | 
				
			||||||
        
 | 
					        Object o;        
 | 
				
			||||||
        Object o;
 | 
					        REQUIRE(0xc0000000 == o );
 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        bool ok = (0xc0000000 == o); // ok
 | 
					 | 
				
			||||||
        REQUIRE(ok);
 | 
					 | 
				
			||||||
        REQUIRE(0xc0000000 == o );	// doesn't compile (VC or GCC)
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -210,10 +206,7 @@ namespace ObjectWithNonConstEqualityOperator
 | 
				
			|||||||
    TEST_CASE("./succeeding/non-const==", "Demonstrate that a non-const == is not used")
 | 
					    TEST_CASE("./succeeding/non-const==", "Demonstrate that a non-const == is not used")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        Test t( 1 );
 | 
					        Test t( 1 );
 | 
				
			||||||
        
 | 
					        REQUIRE( t == 1 );
 | 
				
			||||||
        bool ok = (t == 1); // ok
 | 
					 | 
				
			||||||
        REQUIRE(ok);	
 | 
					 | 
				
			||||||
        REQUIRE( t == 1 );	// doesn't compile (VC or GCC)
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -228,3 +221,17 @@ namespace EnumBitFieldTests
 | 
				
			|||||||
        REQUIRE( 0xc0000000 == bit30and31 );
 | 
					        REQUIRE( 0xc0000000 == bit30and31 );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct Obj
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    Obj():prop(&p){}
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    int p;
 | 
				
			||||||
 | 
					    int* prop;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TEST_CASE("./succeeding/boolean member", "")
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    Obj obj;
 | 
				
			||||||
 | 
					    REQUIRE( obj.prop );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user