mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 00:51:52 +01:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			v1.2.1-dev
			...
			v1.2.1-dev
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					584032dfa4 | ||
| 
						 | 
					18acff62d3 | ||
| 
						 | 
					c1ca0fdabe | ||
| 
						 | 
					d6f1446e4e | ||
| 
						 | 
					62e517f833 | ||
| 
						 | 
					6160a2b079 | 
@@ -1,6 +1,6 @@
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
*v1.2.1-develop.2*
 | 
			
		||||
*v1.2.1-develop.4*
 | 
			
		||||
 | 
			
		||||
Build status (on Travis CI) [](https://travis-ci.org/philsquared/Catch)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,7 @@ namespace Catch {
 | 
			
		||||
            std::set<std::string> tags = test.tags;
 | 
			
		||||
            
 | 
			
		||||
            std::string filename = test.lineInfo.file;
 | 
			
		||||
            std::string::size_type lastSlash = filename.find_last_of( "\//" );
 | 
			
		||||
            std::string::size_type lastSlash = filename.find_last_of( "\\/" );
 | 
			
		||||
            if( lastSlash != std::string::npos )
 | 
			
		||||
                filename = filename.substr( lastSlash+1 );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -60,12 +60,13 @@ namespace {
 | 
			
		||||
        {
 | 
			
		||||
            CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
 | 
			
		||||
            GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo );
 | 
			
		||||
            originalAttributes = csbiInfo.wAttributes;
 | 
			
		||||
            originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY );
 | 
			
		||||
            originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        virtual void use( Colour::Code _colourCode ) {
 | 
			
		||||
            switch( _colourCode ) {
 | 
			
		||||
                case Colour::None:      return setTextAttribute( originalAttributes );
 | 
			
		||||
                case Colour::None:      return setTextAttribute( originalForegroundAttributes );
 | 
			
		||||
                case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );
 | 
			
		||||
                case Colour::Red:       return setTextAttribute( FOREGROUND_RED );
 | 
			
		||||
                case Colour::Green:     return setTextAttribute( FOREGROUND_GREEN );
 | 
			
		||||
@@ -85,10 +86,11 @@ namespace {
 | 
			
		||||
 | 
			
		||||
    private:
 | 
			
		||||
        void setTextAttribute( WORD _textAttribute ) {
 | 
			
		||||
            SetConsoleTextAttribute( stdoutHandle, _textAttribute );
 | 
			
		||||
            SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes );
 | 
			
		||||
        }
 | 
			
		||||
        HANDLE stdoutHandle;
 | 
			
		||||
        WORD originalAttributes;
 | 
			
		||||
        WORD originalForegroundAttributes;
 | 
			
		||||
        WORD originalBackgroundAttributes;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    IColourImpl* platformColourInstance() {
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@ namespace Catch {
 | 
			
		||||
        virtual ~RunContext() {
 | 
			
		||||
            m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, aborting() ) );
 | 
			
		||||
            m_context.setRunner( m_prevRunner );
 | 
			
		||||
            m_context.setConfig( CATCH_NULL );
 | 
			
		||||
            m_context.setConfig( Ptr<IConfig const>() );
 | 
			
		||||
            m_context.setResultCapture( m_prevResultCapture );
 | 
			
		||||
            m_context.setConfig( m_prevConfig );
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ namespace Catch {
 | 
			
		||||
        return os;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Version libraryVersion( 1, 2, 1, "develop", 2 );
 | 
			
		||||
    Version libraryVersion( 1, 2, 1, "develop", 4 );
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,9 @@
 | 
			
		||||
#include "catch.hpp"
 | 
			
		||||
#include "catch_test_spec_parser.hpp"
 | 
			
		||||
 | 
			
		||||
#ifdef __clang__
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wc++98-compat"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
inline Catch::TestCase fakeTestCase( const char* name, const char* desc = "" ){ return Catch::makeTestCase( CATCH_NULL, "", name, desc, CATCH_INTERNAL_LINEINFO ); }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,8 @@
 | 
			
		||||
 *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 | 
			
		||||
 */
 | 
			
		||||
#ifdef __clang__
 | 
			
		||||
#pragma clang diagnostic ignored "-Wpadded"
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wpadded"
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wc++98-compat"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "catch.hpp"
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,8 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef __clang__
 | 
			
		||||
#pragma clang diagnostic ignored "-Wpadded"
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wpadded"
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wc++98-compat"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "internal/catch_test_case_tracker.hpp"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +1,4 @@
 | 
			
		||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
 | 
			
		||||
#include "catch_suppress_warnings.h"
 | 
			
		||||
#include "catch_xmlwriter.hpp"
 | 
			
		||||
#include "catch_reenable_warnings.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -16,8 +16,9 @@ CATCH_REGISTER_TAG_ALIAS( "[@tricky]", "[tricky]~[.]" )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __clang__
 | 
			
		||||
#pragma clang diagnostic ignored "-Wpadded"
 | 
			
		||||
#pragma clang diagnostic ignored "-Wweak-vtables"
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wpadded"
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wweak-vtables"
 | 
			
		||||
#   pragma clang diagnostic ignored "-Wc++98-compat"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  Catch v1.2.1-develop.2
 | 
			
		||||
 *  Generated: 2015-07-02 23:02:49.715552
 | 
			
		||||
 *  Catch v1.2.1-develop.4
 | 
			
		||||
 *  Generated: 2015-07-06 06:21:18.816844
 | 
			
		||||
 *  ----------------------------------------------------------
 | 
			
		||||
 *  This file has been merged from multiple headers. Please don't edit it directly
 | 
			
		||||
 *  Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
 | 
			
		||||
@@ -5213,7 +5213,7 @@ namespace Catch {
 | 
			
		||||
        virtual ~RunContext() {
 | 
			
		||||
            m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, aborting() ) );
 | 
			
		||||
            m_context.setRunner( m_prevRunner );
 | 
			
		||||
            m_context.setConfig( CATCH_NULL );
 | 
			
		||||
            m_context.setConfig( Ptr<IConfig const>() );
 | 
			
		||||
            m_context.setResultCapture( m_prevResultCapture );
 | 
			
		||||
            m_context.setConfig( m_prevConfig );
 | 
			
		||||
        }
 | 
			
		||||
@@ -5618,7 +5618,7 @@ namespace Catch {
 | 
			
		||||
            std::set<std::string> tags = test.tags;
 | 
			
		||||
 | 
			
		||||
            std::string filename = test.lineInfo.file;
 | 
			
		||||
            std::string::size_type lastSlash = filename.find_last_of( "\//" );
 | 
			
		||||
            std::string::size_type lastSlash = filename.find_last_of( "\\/" );
 | 
			
		||||
            if( lastSlash != std::string::npos )
 | 
			
		||||
                filename = filename.substr( lastSlash+1 );
 | 
			
		||||
 | 
			
		||||
@@ -6333,12 +6333,13 @@ namespace {
 | 
			
		||||
        {
 | 
			
		||||
            CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
 | 
			
		||||
            GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo );
 | 
			
		||||
            originalAttributes = csbiInfo.wAttributes;
 | 
			
		||||
            originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY );
 | 
			
		||||
            originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        virtual void use( Colour::Code _colourCode ) {
 | 
			
		||||
            switch( _colourCode ) {
 | 
			
		||||
                case Colour::None:      return setTextAttribute( originalAttributes );
 | 
			
		||||
                case Colour::None:      return setTextAttribute( originalForegroundAttributes );
 | 
			
		||||
                case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );
 | 
			
		||||
                case Colour::Red:       return setTextAttribute( FOREGROUND_RED );
 | 
			
		||||
                case Colour::Green:     return setTextAttribute( FOREGROUND_GREEN );
 | 
			
		||||
@@ -6358,10 +6359,11 @@ namespace {
 | 
			
		||||
 | 
			
		||||
    private:
 | 
			
		||||
        void setTextAttribute( WORD _textAttribute ) {
 | 
			
		||||
            SetConsoleTextAttribute( stdoutHandle, _textAttribute );
 | 
			
		||||
            SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes );
 | 
			
		||||
        }
 | 
			
		||||
        HANDLE stdoutHandle;
 | 
			
		||||
        WORD originalAttributes;
 | 
			
		||||
        WORD originalForegroundAttributes;
 | 
			
		||||
        WORD originalBackgroundAttributes;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    IColourImpl* platformColourInstance() {
 | 
			
		||||
@@ -6821,7 +6823,7 @@ namespace Catch {
 | 
			
		||||
        return os;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Version libraryVersion( 1, 2, 1, "develop", 2 );
 | 
			
		||||
    Version libraryVersion( 1, 2, 1, "develop", 4 );
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user