Skip to content

Commit 017a63d

Browse files
committed
v1.9.5
1 parent b90d0b7 commit 017a63d

File tree

4 files changed

+59
-36
lines changed

4 files changed

+59
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Build Status](https://travis-ci.org/philsquared/Catch.svg?branch=master)](https://travis-ci.org/philsquared/Catch)
55
[![Build status](https://ci.appveyor.com/api/projects/status/hrtk60hv6tw6fght/branch/master?svg=true)](https://ci.appveyor.com/project/philsquared/catch/branch/master)
66

7-
<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>
7+
<a href="https://github.com/philsquared/Catch/releases/download/v1.9.5/catch.hpp">The latest, single header, version can be downloaded directly using this link</a>
88

99
## What's the Catch?
1010

docs/release-notes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# 1.9.5
2+
3+
### Fixes
4+
* Truthy expressions are now reconstructed properly, not as booleans (#914)
5+
* Various warnings are no longer erroneously suppressed in test files (files that include `catch.hpp`, but do not define `CATCH_CONFIG_MAIN` or `CATCH_CONFIG_RUNNER`) (#871)
6+
* Catch no longer fails to link when main is compiled as C++, but linked against Objective-C (#855)
7+
* Fixed incorrect gcc version detection when deciding to use `__COUNTER__` (#928)
8+
* Previously any GCC with minor version less than 3 would be incorrectly classified as not supporting `__COUNTER__`.
9+
* Suppressed C4996 warning caused by upcoming updated to MSVC 2017, marking `std::uncaught_exception` as deprecated. (#927)
10+
11+
### Improvements
12+
* CMake integration script now incorporates debug messages and registers tests in an improved way (#911)
13+
* Various documentation improvements
14+
15+
16+
117
# 1.9.4
218

319
### Fixes

include/internal/catch_version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Catch {
3838
}
3939

4040
inline Version libraryVersion() {
41-
static Version version( 1, 9, 4, "", 0 );
41+
static Version version( 1, 9, 5, "", 0 );
4242
return version;
4343
}
4444

single_include/catch.hpp

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Catch v1.9.4
3-
* Generated: 2017-05-16 13:51:55.506519
2+
* Catch v1.9.5
3+
* Generated: 2017-06-15 12:03:23.301505
44
* ----------------------------------------------------------
55
* This file has been merged from multiple headers. Please don't edit it directly
66
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -220,7 +220,7 @@
220220

221221
// Use __COUNTER__ if the compiler supports it
222222
#if ( defined _MSC_VER && _MSC_VER >= 1300 ) || \
223-
( defined __GNUC__ && __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 ) || \
223+
( defined __GNUC__ && ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 )) ) || \
224224
( defined __clang__ && __clang_major__ >= 3 )
225225

226226
#define CATCH_INTERNAL_CONFIG_COUNTER
@@ -927,8 +927,8 @@ namespace Catch {
927927
template<typename T> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( T const& );
928928
template<typename T> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( T const& );
929929

930-
private:
931-
DecomposedExpression& operator = (DecomposedExpression const&);
930+
private:
931+
DecomposedExpression& operator = (DecomposedExpression const&);
932932
};
933933

934934
struct AssertionInfo
@@ -1571,7 +1571,7 @@ std::string toString( std::nullptr_t );
15711571

15721572
#ifdef __OBJC__
15731573
std::string toString( NSString const * const& nsstring );
1574-
std::string toString( NSString * CATCH_ARC_STRONG const& nsstring );
1574+
std::string toString( NSString * CATCH_ARC_STRONG & nsstring );
15751575
std::string toString( NSObject* const& nsObject );
15761576
#endif
15771577

@@ -1855,7 +1855,7 @@ class ExpressionLhs : public DecomposedExpression {
18551855
}
18561856

18571857
virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE {
1858-
dest = Catch::toString( m_truthy );
1858+
dest = Catch::toString( m_lhs );
18591859
}
18601860

18611861
private:
@@ -3490,16 +3490,16 @@ return @ desc; \
34903490
#include <crtdbg.h>
34913491
class LeakDetector {
34923492
public:
3493-
LeakDetector() {
3494-
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
3495-
flag |= _CRTDBG_LEAK_CHECK_DF;
3496-
flag |= _CRTDBG_ALLOC_MEM_DF;
3497-
_CrtSetDbgFlag(flag);
3498-
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
3499-
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
3500-
// Change this to leaking allocation's number to break there
3501-
_CrtSetBreakAlloc(-1);
3502-
}
3493+
LeakDetector() {
3494+
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
3495+
flag |= _CRTDBG_LEAK_CHECK_DF;
3496+
flag |= _CRTDBG_ALLOC_MEM_DF;
3497+
_CrtSetDbgFlag(flag);
3498+
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
3499+
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
3500+
// Change this to leaking allocation's number to break there
3501+
_CrtSetBreakAlloc(-1);
3502+
}
35033503
};
35043504
#else
35053505
class LeakDetector {};
@@ -8309,7 +8309,7 @@ namespace Catch {
83098309
}
83108310

83118311
inline Version libraryVersion() {
8312-
static Version version( 1, 9, 4, "", 0 );
8312+
static Version version( 1, 9, 5, "", 0 );
83138313
return version;
83148314
}
83158315

@@ -8661,6 +8661,10 @@ namespace Catch {
86618661
m_timer.start();
86628662
}
86638663

8664+
#if defined(_MSC_VER)
8665+
#pragma warning(push)
8666+
#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
8667+
#endif
86648668
Section::~Section() {
86658669
if( m_sectionIncluded ) {
86668670
SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
@@ -8670,6 +8674,9 @@ namespace Catch {
86708674
getResultCapture().sectionEnded( endInfo );
86718675
}
86728676
}
8677+
#if defined(_MSC_VER)
8678+
#pragma warning(pop)
8679+
#endif
86738680

86748681
// This indicates whether the section should be executed or not
86758682
Section::operator bool() const {
@@ -8985,7 +8992,7 @@ std::string toString( std::nullptr_t ) {
89858992
return "nil";
89868993
return "@" + toString([nsstring UTF8String]);
89878994
}
8988-
std::string toString( NSString * CATCH_ARC_STRONG const& nsstring ) {
8995+
std::string toString( NSString * CATCH_ARC_STRONG & nsstring ) {
89898996
if( !nsstring )
89908997
return "nil";
89918998
return "@" + toString([nsstring UTF8String]);
@@ -10028,20 +10035,6 @@ namespace Catch {
1002810035
};
1002910036

1003010037
}
10031-
// #included from: catch_reenable_warnings.h
10032-
10033-
#define TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
10034-
10035-
#ifdef __clang__
10036-
# ifdef __ICC // icpc defines the __clang__ macro
10037-
# pragma warning(pop)
10038-
# else
10039-
# pragma clang diagnostic pop
10040-
# endif
10041-
#elif defined __GNUC__
10042-
# pragma GCC diagnostic pop
10043-
#endif
10044-
1004510038

1004610039
namespace Catch {
1004710040
class XmlReporter : public StreamingReporterBase {
@@ -11303,7 +11296,7 @@ extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) {
1130311296
int main (int argc, char * argv[]) {
1130411297
#endif
1130511298

11306-
int result = Catch::Session().run( argc, argv );
11299+
int result = Catch::Session().run( argc, argv );
1130711300
return ( result < 0xff ? result : 0xff );
1130811301
}
1130911302

@@ -11504,5 +11497,19 @@ int main (int argc, char * const argv[]) {
1150411497

1150511498
using Catch::Detail::Approx;
1150611499

11500+
// #included from: internal/catch_reenable_warnings.h
11501+
11502+
#define TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
11503+
11504+
#ifdef __clang__
11505+
# ifdef __ICC // icpc defines the __clang__ macro
11506+
# pragma warning(pop)
11507+
# else
11508+
# pragma clang diagnostic pop
11509+
# endif
11510+
#elif defined __GNUC__
11511+
# pragma GCC diagnostic pop
11512+
#endif
11513+
1150711514
#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED
1150811515

0 commit comments

Comments
 (0)