mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +01:00 
			
		
		
		
	build 10
First cut of TeamCity reporter
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
*v1.1 build 9 (develop branch)*
 | 
			
		||||
*v1.1 build 10 (develop branch)*
 | 
			
		||||
 | 
			
		||||
Build status (on Travis CI) [](https://travis-ci.org/philsquared/Catch)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
namespace Catch {
 | 
			
		||||
 | 
			
		||||
    // These numbers are maintained by a script
 | 
			
		||||
    Version libraryVersion( 1, 1, 9, "develop" );
 | 
			
		||||
    Version libraryVersion( 1, 1, 10, "develop" );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  CATCH v1.1 build 9 (develop branch)
 | 
			
		||||
 *  Generated: 2014-12-15 07:26:07.689692
 | 
			
		||||
 *  CATCH v1.1 build 10 (develop branch)
 | 
			
		||||
 *  Generated: 2014-12-21 00:20:17.212897
 | 
			
		||||
 *  ----------------------------------------------------------
 | 
			
		||||
 *  This file has been merged from multiple headers. Please don't edit it directly
 | 
			
		||||
 *  Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
 | 
			
		||||
@@ -33,11 +33,11 @@
 | 
			
		||||
#pragma GCC diagnostic ignored "-Wpadded"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef CATCH_CONFIG_MAIN
 | 
			
		||||
#  define CATCH_CONFIG_RUNNER
 | 
			
		||||
#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER)
 | 
			
		||||
#  define CATCH_IMPL
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef CATCH_CONFIG_RUNNER
 | 
			
		||||
#ifdef CATCH_IMPL
 | 
			
		||||
#  ifndef CLARA_CONFIG_MAIN
 | 
			
		||||
#    define CLARA_CONFIG_MAIN_NOT_DEFINED
 | 
			
		||||
#    define CLARA_CONFIG_MAIN
 | 
			
		||||
@@ -227,6 +227,7 @@ namespace Catch {
 | 
			
		||||
    void toLowerInPlace( std::string& s );
 | 
			
		||||
    std::string toLower( std::string const& s );
 | 
			
		||||
    std::string trim( std::string const& str );
 | 
			
		||||
    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis );
 | 
			
		||||
 | 
			
		||||
    struct pluralise {
 | 
			
		||||
        pluralise( std::size_t count, std::string const& label );
 | 
			
		||||
@@ -2737,7 +2738,7 @@ return @ desc; \
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef CATCH_CONFIG_RUNNER
 | 
			
		||||
#ifdef CATCH_IMPL
 | 
			
		||||
// #included from: internal/catch_impl.hpp
 | 
			
		||||
#define TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED
 | 
			
		||||
 | 
			
		||||
@@ -4676,6 +4677,7 @@ namespace Catch
 | 
			
		||||
 | 
			
		||||
        virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;
 | 
			
		||||
 | 
			
		||||
        // The return value indicates if the messages buffer should be cleared:
 | 
			
		||||
        virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;
 | 
			
		||||
        virtual void sectionEnded( SectionStats const& sectionStats ) = 0;
 | 
			
		||||
        virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;
 | 
			
		||||
@@ -4824,7 +4826,7 @@ namespace Catch {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    inline std::size_t listReporters( Config const& /*config*/ ) {
 | 
			
		||||
        Catch::cout() << "Available reports:\n";
 | 
			
		||||
        Catch::cout() << "Available reporters:\n";
 | 
			
		||||
        IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
 | 
			
		||||
        IReporterRegistry::FactoryMap::const_iterator itBegin = factories.begin(), itEnd = factories.end(), it;
 | 
			
		||||
        std::size_t maxNameLen = 0;
 | 
			
		||||
@@ -6669,7 +6671,7 @@ namespace Catch {
 | 
			
		||||
namespace Catch {
 | 
			
		||||
 | 
			
		||||
    // These numbers are maintained by a script
 | 
			
		||||
    Version libraryVersion( 1, 1, 9, "develop" );
 | 
			
		||||
    Version libraryVersion( 1, 1, 10, "develop" );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// #included from: catch_message.hpp
 | 
			
		||||
@@ -6912,6 +6914,20 @@ namespace Catch {
 | 
			
		||||
        return start != std::string::npos ? str.substr( start, 1+end-start ) : "";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {
 | 
			
		||||
        bool replaced = false;
 | 
			
		||||
        std::size_t i = str.find( replaceThis );
 | 
			
		||||
        while( i != std::string::npos ) {
 | 
			
		||||
            replaced = true;
 | 
			
		||||
            str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() );
 | 
			
		||||
            if( i < str.size()-withThis.size() )
 | 
			
		||||
                i = str.find( replaceThis, i+withThis.size() );
 | 
			
		||||
            else
 | 
			
		||||
                i = std::string::npos;
 | 
			
		||||
        }
 | 
			
		||||
        return replaced;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pluralise::pluralise( std::size_t count, std::string const& label )
 | 
			
		||||
    :   m_count( count ),
 | 
			
		||||
        m_label( label )
 | 
			
		||||
@@ -7652,6 +7668,16 @@ namespace Catch {
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    template<char C>
 | 
			
		||||
    char const* getLineOfChars() {
 | 
			
		||||
        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
 | 
			
		||||
        if( !*line ) {
 | 
			
		||||
            memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );
 | 
			
		||||
            line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;
 | 
			
		||||
        }
 | 
			
		||||
        return line;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
} // end namespace Catch
 | 
			
		||||
 | 
			
		||||
// #included from: ../internal/catch_reporter_registrars.hpp
 | 
			
		||||
@@ -8724,15 +8750,6 @@ namespace Catch {
 | 
			
		||||
        void printSummaryDivider() {
 | 
			
		||||
            stream << getLineOfChars<'-'>() << "\n";
 | 
			
		||||
        }
 | 
			
		||||
        template<char C>
 | 
			
		||||
        static char const* getLineOfChars() {
 | 
			
		||||
            static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
 | 
			
		||||
            if( !*line ) {
 | 
			
		||||
                memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );
 | 
			
		||||
                line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;
 | 
			
		||||
            }
 | 
			
		||||
            return line;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    private:
 | 
			
		||||
        bool m_headerPrinted;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user