diff --git a/README.md b/README.md
index 3df32875..501ce6e3 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@

-*v1.7.1*
+*v1.7.2*
Build status (on Travis CI) [](https://travis-ci.org/philsquared/Catch)
-The latest, single header, version can be downloaded directly using this link
+The latest, single header, version can be downloaded directly using this link
## What's the Catch?
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 0fbf9eef..e1bd19d2 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -1,3 +1,24 @@
+# 1.7.2
+
+### Fixes and minor improvements
+Xml:
+
+(technically the first two are breaking changes but are also fixes and arguably break few if any people)
+* C-escape control characters instead of XML encoding them (which requires XML 1.1)
+* Revert XML output to XML 1.0
+* Can provide stylesheet references by extending the XML reporter
+* Added description and tags attribites to XML Reporter
+* Tags are closed and the stream flushed more eagerly to avoid stdout interpolation
+
+
+Other:
+* `REQUIRE_THROWS_AS` now catches exception by `const&` and reports expected type
+* In `SECTION`s the file/ line is now of the `SECTION`. not the `TEST_CASE`
+* Added std:: qualification to some functions from C stdlib
+* Removed use of RTTI (`dynamic_cast`) that had crept back in
+* Silenced a few more warnings in different circumstances
+* Travis improvements
+
# 1.7.1
### Fixes:
diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp
index 1348989c..1041e303 100644
--- a/include/internal/catch_version.hpp
+++ b/include/internal/catch_version.hpp
@@ -37,7 +37,7 @@ namespace Catch {
return os;
}
- Version libraryVersion( 1, 7, 1, "", 0 );
+ Version libraryVersion( 1, 7, 2, "", 0 );
}
diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index 6a0a58ed..2a09fd19 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,6 +1,6 @@
/*
- * Catch v1.7.1
- * Generated: 2017-02-07 09:44:56.263047
+ * Catch v1.7.2
+ * Generated: 2017-02-13 15:57:33.350226
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -337,7 +337,6 @@
#define INTERNAL_CATCH_STRINGIFY( expr ) INTERNAL_CATCH_STRINGIFY2( expr )
#include
-#include
#include
namespace Catch {
@@ -396,7 +395,6 @@ namespace Catch {
bool endsWith( std::string const& s, std::string const& suffix );
bool endsWith( std::string const& s, char suffix );
bool contains( std::string const& s, std::string const& infix );
- bool contains( std::string const& s, std::string const& infix );
void toLowerInPlace( std::string& s );
std::string toLower( std::string const& s );
std::string trim( std::string const& str );
@@ -459,8 +457,6 @@ namespace Catch {
#define CATCH_INTERNAL_LINEINFO ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) )
#define CATCH_INTERNAL_ERROR( msg ) ::Catch::throwLogicError( msg, CATCH_INTERNAL_LINEINFO );
-#include
-
namespace Catch {
class NotImplementedException : public std::exception
@@ -593,10 +589,6 @@ namespace Catch {
#pragma clang diagnostic pop
#endif
-#include
-#include
-#include
-
namespace Catch {
class TestCase;
@@ -2215,6 +2207,45 @@ namespace Catch {
};
}
+// #included from: catch_type_traits.hpp
+#define TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED
+
+#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
+#include
+#endif
+
+namespace Catch {
+
+#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
+
+ template
+ using add_lvalue_reference = std::add_lvalue_reference;
+
+ template
+ using add_const = std::add_const;
+
+#else
+
+ template
+ struct add_const {
+ typedef const T type;
+ };
+
+ template
+ struct add_lvalue_reference {
+ typedef T& type;
+ };
+ template
+ struct add_lvalue_reference {
+ typedef T& type;
+ };
+ // No && overload, because that is C++11, in which case we have
+ // proper type_traits implementation from the standard library
+
+#endif
+
+}
+
///////////////////////////////////////////////////////////////////////////////
// In the event of a failure works out if the debugger needs to be invoked
// and/or an exception thrown and takes appropriate action.
@@ -2283,13 +2314,13 @@ namespace Catch {
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_THROWS_AS( expr, exceptionType, resultDisposition, macroName ) \
do { \
- Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
+ Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr ", " #exceptionType, resultDisposition ); \
if( __catchResult.allowThrows() ) \
try { \
static_cast(expr); \
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
} \
- catch( exceptionType ) { \
+ catch( Catch::add_const::type>::type ) { \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
} \
catch( ... ) { \
@@ -2411,6 +2442,8 @@ namespace Catch {
};
}
+#include
+
namespace Catch {
struct SectionInfo {
@@ -2818,7 +2851,7 @@ namespace Detail {
friend bool operator == ( const T& lhs, Approx const& rhs ) {
// Thanks to Richard Harris for his help refining this formula
auto lhs_v = double(lhs);
- return fabs( lhs_v - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs_v), fabs(rhs.m_value) ) );
+ return std::fabs( lhs_v - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( std::fabs(lhs_v), std::fabs(rhs.m_value) ) );
}
template ::value>::type>
@@ -2862,7 +2895,7 @@ namespace Detail {
#else
friend bool operator == ( double lhs, Approx const& rhs ) {
// Thanks to Richard Harris for his help refining this formula
- return fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) );
+ return std::fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( std::fabs(lhs), std::fabs(rhs.m_value) ) );
}
friend bool operator == ( Approx const& lhs, double rhs ) {
@@ -3348,6 +3381,8 @@ return @ desc; \
// #included from: catch_wildcard_pattern.hpp
#define TWOBLUECUBES_CATCH_WILDCARD_PATTERN_HPP_INCLUDED
+#include
+
namespace Catch
{
class WildcardPattern {
@@ -3601,7 +3636,7 @@ namespace Catch {
// #included from: catch_interfaces_config.h
#define TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED
-#include
+#include
#include
#include
@@ -3723,8 +3758,7 @@ namespace Catch {
#include
#include
#include
-#include
-#include
+#include
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
#define CATCH_CONFIG_CONSOLE_WIDTH 80
@@ -3806,8 +3840,7 @@ namespace Catch {
}
}
- virtual ~Config() {
- }
+ virtual ~Config() {}
std::string const& getFilename() const {
return m_data.outputFilename ;
@@ -3820,28 +3853,26 @@ namespace Catch {
std::string getProcessName() const { return m_data.processName; }
- bool shouldDebugBreak() const { return m_data.shouldDebugBreak; }
-
std::vector const& getReporterNames() const { return m_data.reporterNames; }
std::vector const& getSectionsToRun() const CATCH_OVERRIDE { return m_data.sectionsToRun; }
- int abortAfter() const { return m_data.abortAfter; }
-
- TestSpec const& testSpec() const { return m_testSpec; }
+ virtual TestSpec const& testSpec() const CATCH_OVERRIDE { return m_testSpec; }
bool showHelp() const { return m_data.showHelp; }
- bool showInvisibles() const { return m_data.showInvisibles; }
// IConfig interface
- virtual bool allowThrows() const { return !m_data.noThrow; }
- virtual std::ostream& stream() const { return m_stream->stream(); }
- virtual std::string name() const { return m_data.name.empty() ? m_data.processName : m_data.name; }
- virtual bool includeSuccessfulResults() const { return m_data.showSuccessfulTests; }
- virtual bool warnAboutMissingAssertions() const { return m_data.warnings & WarnAbout::NoAssertions; }
- virtual ShowDurations::OrNot showDurations() const { return m_data.showDurations; }
- virtual RunTests::InWhatOrder runOrder() const { return m_data.runOrder; }
- virtual unsigned int rngSeed() const { return m_data.rngSeed; }
- virtual UseColour::YesOrNo useColour() const { return m_data.useColour; }
+ virtual bool allowThrows() const CATCH_OVERRIDE { return !m_data.noThrow; }
+ virtual std::ostream& stream() const CATCH_OVERRIDE { return m_stream->stream(); }
+ virtual std::string name() const CATCH_OVERRIDE { return m_data.name.empty() ? m_data.processName : m_data.name; }
+ virtual bool includeSuccessfulResults() const CATCH_OVERRIDE { return m_data.showSuccessfulTests; }
+ virtual bool warnAboutMissingAssertions() const CATCH_OVERRIDE { return m_data.warnings & WarnAbout::NoAssertions; }
+ virtual ShowDurations::OrNot showDurations() const CATCH_OVERRIDE { return m_data.showDurations; }
+ virtual RunTests::InWhatOrder runOrder() const CATCH_OVERRIDE { return m_data.runOrder; }
+ virtual unsigned int rngSeed() const CATCH_OVERRIDE { return m_data.rngSeed; }
+ virtual UseColour::YesOrNo useColour() const CATCH_OVERRIDE { return m_data.useColour; }
+ virtual bool shouldDebugBreak() const CATCH_OVERRIDE { return m_data.shouldDebugBreak; }
+ virtual int abortAfter() const CATCH_OVERRIDE { return m_data.abortAfter; }
+ virtual bool showInvisibles() const CATCH_OVERRIDE { return m_data.showInvisibles; }
private:
@@ -4903,6 +4934,7 @@ STITCH_CLARA_CLOSE_NAMESPACE
#endif
#include
+#include
namespace Catch {
@@ -4941,7 +4973,7 @@ namespace Catch {
ss << seed;
ss >> config.rngSeed;
if( ss.fail() )
- throw std::runtime_error( "Argment to --rng-seed should be the word 'time' or a number" );
+ throw std::runtime_error( "Argument to --rng-seed should be the word 'time' or a number" );
}
}
inline void setVerbosity( ConfigData& config, int level ) {
@@ -5338,7 +5370,6 @@ namespace Catch {
#include
#include
#include