mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	v1.9.4
This commit is contained in:
		| @@ -4,7 +4,7 @@ | ||||
| [](https://travis-ci.org/philsquared/Catch) | ||||
| [](https://ci.appveyor.com/project/philsquared/catch/branch/master) | ||||
|  | ||||
| <a href="https://github.com/philsquared/Catch/releases/download/v1.9.3/catch.hpp">The latest, single header, version can be downloaded directly using this link</a> | ||||
| <a href="https://github.com/philsquared/Catch/releases/download/v1.9.4/catch.hpp">The latest, single header, version can be downloaded directly using this link</a> | ||||
|  | ||||
| ## What's the Catch? | ||||
|  | ||||
|   | ||||
| @@ -1,3 +1,13 @@ | ||||
| # 1.9.4 | ||||
|  | ||||
| ### Fixes | ||||
| * `CATCH_FAIL` macro no longer causes compilation error without variadic macro support | ||||
| * `INFO` messages are no longer cleared after being reported once | ||||
|  | ||||
| ### Improvements and minor changes | ||||
| * Catch now uses `wmain` when compiled under Windows and `UNICODE` is defined. | ||||
|   * Note that Catch still officially supports only ASCII | ||||
|  | ||||
| # 1.9.3 | ||||
|  | ||||
| ### Fixes | ||||
|   | ||||
| @@ -38,7 +38,7 @@ namespace Catch { | ||||
|     } | ||||
|  | ||||
|     inline Version libraryVersion() { | ||||
|         static Version version( 1, 9, 3, "", 0 ); | ||||
|         static Version version( 1, 9, 4, "", 0 ); | ||||
|         return version; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /* | ||||
|  *  Catch v1.9.3 | ||||
|  *  Generated: 2017-04-25 14:16:29.434734 | ||||
|  *  Catch v1.9.4 | ||||
|  *  Generated: 2017-05-16 13:51:55.506519 | ||||
|  *  ---------------------------------------------------------- | ||||
|  *  This file has been merged from multiple headers. Please don't edit it directly | ||||
|  *  Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. | ||||
| @@ -2272,7 +2272,7 @@ namespace Catch { | ||||
|             INTERNAL_CATCH_REACT( __catchResult ) \ | ||||
|         } while( Catch::alwaysFalse() ) | ||||
| #else | ||||
|     #define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, log ) \ | ||||
|     #define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, log ) \ | ||||
|         do { \ | ||||
|             Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \ | ||||
|             __catchResult << log + ::Catch::StreamEndStop(); \ | ||||
| @@ -6642,8 +6642,9 @@ namespace Catch { | ||||
|                 m_totals.assertions.failed++; | ||||
|             } | ||||
|  | ||||
|             if( m_reporter->assertionEnded( AssertionStats( result, m_messages, m_totals ) ) ) | ||||
|                 m_messages.clear(); | ||||
|             // We have no use for the return value (whether messages should be cleared), because messages were made scoped | ||||
|             // and should be let to clear themselves out. | ||||
|             static_cast<void>(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals))); | ||||
|  | ||||
|             // Reset working state | ||||
|             m_lastAssertionInfo = AssertionInfo( std::string(), m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition ); | ||||
| @@ -7052,6 +7053,32 @@ namespace Catch { | ||||
|             return returnCode; | ||||
|         } | ||||
|  | ||||
|     #if defined(WIN32) && defined(UNICODE) | ||||
|         int run( int argc, wchar_t const* const* const argv ) { | ||||
|  | ||||
|             char **utf8Argv = new char *[ argc ]; | ||||
|  | ||||
|             for ( int i = 0; i < argc; ++i ) { | ||||
|                 int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, NULL, 0, NULL, NULL ); | ||||
|  | ||||
|                 utf8Argv[ i ] = new char[ bufSize ]; | ||||
|  | ||||
|                 WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, NULL, NULL ); | ||||
|             } | ||||
|  | ||||
|             int returnCode = applyCommandLine( argc, utf8Argv ); | ||||
|             if( returnCode == 0 ) | ||||
|                 returnCode = run(); | ||||
|  | ||||
|             for ( int i = 0; i < argc; ++i ) | ||||
|                 delete [] utf8Argv[ i ]; | ||||
|  | ||||
|             delete [] utf8Argv; | ||||
|  | ||||
|             return returnCode; | ||||
|         } | ||||
|     #endif | ||||
|  | ||||
|         int run() { | ||||
|             if( m_configData.showHelp ) | ||||
|                 return 0; | ||||
| @@ -8282,7 +8309,7 @@ namespace Catch { | ||||
|     } | ||||
|  | ||||
|     inline Version libraryVersion() { | ||||
|         static Version version( 1, 9, 3, "", 0 ); | ||||
|         static Version version( 1, 9, 4, "", 0 ); | ||||
|         return version; | ||||
|     } | ||||
|  | ||||
| @@ -11268,8 +11295,14 @@ namespace Catch { | ||||
|  | ||||
| #ifndef __OBJC__ | ||||
|  | ||||
| #if defined(WIN32) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) | ||||
| // Standard C/C++ Win32 Unicode wmain entry point | ||||
| extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { | ||||
| #else | ||||
| // Standard C/C++ main entry point | ||||
| int main (int argc, char * argv[]) { | ||||
| #endif | ||||
|  | ||||
| 	int result = Catch::Session().run( argc, argv ); | ||||
|     return ( result < 0xff ? result : 0xff ); | ||||
| } | ||||
| @@ -11349,7 +11382,7 @@ int main (int argc, char * const argv[]) { | ||||
|     #define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) | ||||
|     #define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) | ||||
|     #define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) | ||||
|     #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, "CATCH_FAIL", __VA_ARGS__ ) | ||||
|     #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) | ||||
|     #define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) | ||||
|     #define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) | ||||
| #else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský