mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Merge pull request #1336 from ax3l/topic-overrideVirtualRedundant
Refactor: override implies virtual
This commit is contained in:
		| @@ -85,7 +85,7 @@ namespace Catch { | ||||
|         std::vector<std::string> const& getTestsOrTags() const override; | ||||
|         std::vector<std::string> const& getSectionsToRun() const override; | ||||
|  | ||||
|         virtual TestSpec const& testSpec() const override; | ||||
|         TestSpec const& testSpec() const override; | ||||
|         bool hasTestFilters() const override; | ||||
|  | ||||
|         bool showHelp() const; | ||||
|   | ||||
| @@ -69,7 +69,7 @@ namespace { | ||||
|             originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY ); | ||||
|         } | ||||
|  | ||||
|         virtual void use( Colour::Code _colourCode ) override { | ||||
|         void use( Colour::Code _colourCode ) override { | ||||
|             switch( _colourCode ) { | ||||
|                 case Colour::None:      return setTextAttribute( originalForegroundAttributes ); | ||||
|                 case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); | ||||
| @@ -132,7 +132,7 @@ namespace { | ||||
|     // https://github.com/philsquared/Catch/pull/131 | ||||
|     class PosixColourImpl : public IColourImpl { | ||||
|     public: | ||||
|         virtual void use( Colour::Code _colourCode ) override { | ||||
|         void use( Colour::Code _colourCode ) override { | ||||
|             switch( _colourCode ) { | ||||
|                 case Colour::None: | ||||
|                 case Colour::White:     return setColour( "[0m" ); | ||||
|   | ||||
| @@ -13,27 +13,27 @@ namespace Catch { | ||||
|     class Context : public IMutableContext, NonCopyable { | ||||
|  | ||||
|     public: // IContext | ||||
|         virtual IResultCapture* getResultCapture() override { | ||||
|         IResultCapture* getResultCapture() override { | ||||
|             return m_resultCapture; | ||||
|         } | ||||
|         virtual IRunner* getRunner() override { | ||||
|         IRunner* getRunner() override { | ||||
|             return m_runner; | ||||
|         } | ||||
|  | ||||
|         virtual IConfigPtr const& getConfig() const override { | ||||
|         IConfigPtr const& getConfig() const override { | ||||
|             return m_config; | ||||
|         } | ||||
|  | ||||
|         virtual ~Context() override; | ||||
|         ~Context() override; | ||||
|  | ||||
|     public: // IMutableContext | ||||
|         virtual void setResultCapture( IResultCapture* resultCapture ) override { | ||||
|         void setResultCapture( IResultCapture* resultCapture ) override { | ||||
|             m_resultCapture = resultCapture; | ||||
|         } | ||||
|         virtual void setRunner( IRunner* runner ) override { | ||||
|         void setRunner( IRunner* runner ) override { | ||||
|             m_runner = runner; | ||||
|         } | ||||
|         virtual void setConfig( IConfigPtr const& config ) override { | ||||
|         void setConfig( IConfigPtr const& config ) override { | ||||
|             m_config = config; | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -19,7 +19,7 @@ namespace Catch { | ||||
|     public: | ||||
|         ~ExceptionTranslatorRegistry(); | ||||
|         virtual void registerTranslator( const IExceptionTranslator* translator ); | ||||
|         virtual std::string translateActiveException() const override; | ||||
|         std::string translateActiveException() const override; | ||||
|         std::string tryTranslators() const; | ||||
|  | ||||
|     private: | ||||
|   | ||||
| @@ -18,11 +18,11 @@ namespace Catch { | ||||
|  | ||||
|         class ReporterFactory : public IReporterFactory { | ||||
|  | ||||
|             virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override { | ||||
|             IStreamingReporterPtr create( ReporterConfig const& config ) const override { | ||||
|                 return std::unique_ptr<T>( new T( config ) ); | ||||
|             } | ||||
|  | ||||
|             virtual std::string getDescription() const override { | ||||
|             std::string getDescription() const override { | ||||
|                 return T::getDescription(); | ||||
|             } | ||||
|         }; | ||||
| @@ -39,10 +39,10 @@ namespace Catch { | ||||
|  | ||||
|         class ListenerFactory : public IReporterFactory { | ||||
|  | ||||
|             virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override { | ||||
|             IStreamingReporterPtr create( ReporterConfig const& config ) const override { | ||||
|                 return std::unique_ptr<T>( new T( config ) ); | ||||
|             } | ||||
|             virtual std::string getDescription() const override { | ||||
|             std::string getDescription() const override { | ||||
|                 return std::string(); | ||||
|             } | ||||
|         }; | ||||
|   | ||||
| @@ -33,7 +33,7 @@ namespace Catch { | ||||
|         public: | ||||
|             NamePattern( std::string const& name ); | ||||
|             virtual ~NamePattern(); | ||||
|             virtual bool matches( TestCaseInfo const& testCase ) const override; | ||||
|             bool matches( TestCaseInfo const& testCase ) const override; | ||||
|         private: | ||||
|             WildcardPattern m_wildcardPattern; | ||||
|         }; | ||||
| @@ -42,7 +42,7 @@ namespace Catch { | ||||
|         public: | ||||
|             TagPattern( std::string const& tag ); | ||||
|             virtual ~TagPattern(); | ||||
|             virtual bool matches( TestCaseInfo const& testCase ) const override; | ||||
|             bool matches( TestCaseInfo const& testCase ) const override; | ||||
|         private: | ||||
|             std::string m_tag; | ||||
|         }; | ||||
| @@ -51,7 +51,7 @@ namespace Catch { | ||||
|         public: | ||||
|             ExcludedPattern( PatternPtr const& underlyingPattern ); | ||||
|             virtual ~ExcludedPattern(); | ||||
|             virtual bool matches( TestCaseInfo const& testCase ) const override; | ||||
|             bool matches( TestCaseInfo const& testCase ) const override; | ||||
|         private: | ||||
|             PatternPtr m_underlyingPattern; | ||||
|         }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský