mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Add -Wmissing-declarations to the SelfTest project
This required some clean-up in our test files
This commit is contained in:
		| @@ -21,24 +21,17 @@ namespace Catch | ||||
|  | ||||
| } // namespace Catch | ||||
|  | ||||
| inline Catch::TrackerContext& C_A_T_C_H_Context() { | ||||
|     return Catch::TrackerContext::instance(); | ||||
| } | ||||
|  | ||||
| // ------------------- | ||||
|  | ||||
| #include "catch.hpp" | ||||
|  | ||||
| using namespace Catch; | ||||
|  | ||||
| //inline void testCase( Catch::LocalContext const& C_A_T_C_H_Context ) { | ||||
| // | ||||
| //    REQUIRE( C_A_T_C_H_Context().i() == 42 ); | ||||
| //} | ||||
|  | ||||
| namespace { | ||||
| Catch::TestCaseTracking::NameAndLocation makeNAL( std::string const& name ) { | ||||
|     return Catch::TestCaseTracking::NameAndLocation( name, Catch::SourceLineInfo("",0) ); | ||||
| } | ||||
| } | ||||
|  | ||||
| TEST_CASE( "Tracker" ) { | ||||
|  | ||||
|   | ||||
| @@ -16,23 +16,22 @@ namespace Catch { | ||||
|         } | ||||
|     }; | ||||
|  | ||||
|  | ||||
|     namespace { | ||||
|     auto isOwned( StringRef const& stringRef ) -> bool { | ||||
|         return StringRefTestAccess::isOwned( stringRef ); | ||||
|     } | ||||
|     auto isSubstring( StringRef const& stringRef ) -> bool { | ||||
|         return StringRefTestAccess::isSubstring( stringRef ); | ||||
|     } | ||||
| } // namespace Catch2 | ||||
|     } // end anonymous namespace | ||||
|  | ||||
| namespace Catch { | ||||
|     inline auto toString( Catch::StringRef const& stringRef ) -> std::string { | ||||
|         return std::string( stringRef.currentData(), stringRef.size() ); | ||||
|     } | ||||
| } // namespace Catch | ||||
|  | ||||
| TEST_CASE( "StringRef", "[Strings][StringRef]" ) { | ||||
|  | ||||
|     using Catch::StringRef; | ||||
|     using Catch::isOwned; using Catch::isSubstring; | ||||
|  | ||||
|     SECTION( "Empty string" ) { | ||||
|         StringRef empty; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský