mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Changed relative #includes and made SourceLineInfo sortable (added < op)
This commit is contained in:
		| @@ -15,7 +15,7 @@ | ||||
| #include "catch_common.h" | ||||
| #include "catch_tostring.h" | ||||
| #include "catch_interfaces_runner.h" | ||||
| #include "internal/catch_compiler_capabilities.h" | ||||
| #include "catch_compiler_capabilities.h" | ||||
|  | ||||
|  | ||||
| /////////////////////////////////////////////////////////////////////////////// | ||||
|   | ||||
| @@ -94,6 +94,7 @@ namespace Catch { | ||||
| #  endif | ||||
|         bool empty() const; | ||||
|         bool operator == ( SourceLineInfo const& other ) const; | ||||
|         bool operator < ( SourceLineInfo const& other ) const; | ||||
|  | ||||
|         std::string file; | ||||
|         std::size_t line; | ||||
|   | ||||
| @@ -78,6 +78,9 @@ namespace Catch { | ||||
|     bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const { | ||||
|         return line == other.line && file == other.file; | ||||
|     } | ||||
|     bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const { | ||||
|         return line < other.line || ( line == other.line  && file < other.file ); | ||||
|     } | ||||
|  | ||||
|     std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) { | ||||
| #ifndef __GNUG__ | ||||
|   | ||||
| @@ -60,7 +60,7 @@ namespace Catch { | ||||
|             std::string testName = getResultCapture()->getCurrentTestName(); | ||||
|  | ||||
|             std::map<std::string, IGeneratorsForTest*>::const_iterator it = | ||||
|             m_generatorsByTestName.find( testName ); | ||||
|                 m_generatorsByTestName.find( testName ); | ||||
|             return it != m_generatorsByTestName.end() | ||||
|                 ? it->second | ||||
|                 : NULL; | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
| #pragma clang diagnostic ignored "-Wweak-vtables" | ||||
| #endif | ||||
|  | ||||
| #include "catch_runner.hpp" | ||||
| #include "../catch_runner.hpp" | ||||
| #include "catch_registry_hub.hpp" | ||||
| #include "catch_notimplemented_exception.hpp" | ||||
| #include "catch_context_impl.hpp" | ||||
|   | ||||
| @@ -17,7 +17,7 @@ | ||||
| // NB. Any general catch headers included here must be included | ||||
| // in catch.hpp first to make sure they are included by the single | ||||
| // header for non obj-usage | ||||
| #include "internal/catch_test_case_info.h" | ||||
| #include "catch_test_case_info.h" | ||||
|  | ||||
| /////////////////////////////////////////////////////////////////////////////// | ||||
| // This protocol is really only here for (self) documenting purposes, since | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|  | ||||
| #include "catch_common.h" | ||||
| #include "catch_interfaces_testcase.h" | ||||
| #include "internal/catch_compiler_capabilities.h" | ||||
| #include "catch_compiler_capabilities.h" | ||||
|  | ||||
| namespace Catch { | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash