mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Fix StringRef self-assignment after substring
Thanks to Alex Tkachenko for spotting it.
This commit is contained in:
		| @@ -92,6 +92,11 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) { | ||||
|             REQUIRE( isOwned( ss ) ); | ||||
|  | ||||
|             REQUIRE( ss.currentData() != s.currentData() ); // different pointer value | ||||
|  | ||||
|             SECTION( "Self-assignment after substring" ) { | ||||
|                 ss = ss; | ||||
|                 REQUIRE(isOwned(ss) == true); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         SECTION( "non-zero-based substring") { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash