Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/single_include/catch.hpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-10-31 13:55:48 +0100
committerMartin Hořeňovský2017-10-31 13:55:48 +0100
commit2a3606f8e30c50c236107b6513ce57c6d609b7ac (patch)
treee0f462b8803293fa3729a9a78f9aaff693eacddb /single_include/catch.hpp
parenta6cf19abff33a790695d571b35c022e7c496095f (diff)
downloadcatch3-1.11.0.tar.gz
v1.11.0v1.11.0
Diffstat (limited to 'single_include/catch.hpp')
-rw-r--r--single_include/catch.hpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index 4d1fc334..849c53c1 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,6 +1,6 @@
/*
- * Catch v1.10.0
- * Generated: 2017-08-26 15:16:46.676990
+ * Catch v1.11.0
+ * Generated: 2017-10-31 13:42:42.914833
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -228,7 +228,12 @@
( defined __GNUC__ && ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 )) ) || \
( defined __clang__ && __clang_major__ >= 3 )
-#define CATCH_INTERNAL_CONFIG_COUNTER
+// Use of __COUNTER__ is suppressed during code analysis in CLion/AppCode 2017.2.x and former,
+// because __COUNTER__ is not properly handled by it.
+// This does not affect compilation
+#if ( !defined __JETBRAINS_IDE__ || __JETBRAINS_IDE__ >= 20170300L )
+ #define CATCH_INTERNAL_CONFIG_COUNTER
+#endif
#endif
@@ -309,10 +314,7 @@
#if defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_NO_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_CPP11)
# define CATCH_CONFIG_CPP11_UNIQUE_PTR
#endif
-// Use of __COUNTER__ is suppressed if __JETBRAINS_IDE__ is #defined (meaning we're being parsed by a JetBrains IDE for
-// analytics) because, at time of writing, __COUNTER__ is not properly handled by it.
-// This does not affect compilation
-#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) && !defined(__JETBRAINS_IDE__)
+#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER)
# define CATCH_CONFIG_COUNTER
#endif
#if defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_NO_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_NO_CPP11)
@@ -2756,7 +2758,8 @@ namespace Detail {
if (relativeOK) {
return true;
}
- return std::fabs(lhs_v - rhs.m_value) < rhs.m_margin;
+
+ return std::fabs(lhs_v - rhs.m_value) <= rhs.m_margin;
}
template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
@@ -2828,7 +2831,7 @@ namespace Detail {
if (relativeOK) {
return true;
}
- return std::fabs(lhs - rhs.m_value) < rhs.m_margin;
+ return std::fabs(lhs - rhs.m_value) <= rhs.m_margin;
}
friend bool operator == ( Approx const& lhs, double rhs ) {
@@ -5279,10 +5282,6 @@ namespace Catch {
.describe( "should output be colourised" )
.bind( &setUseColour, "yes|no" );
- cli["--use-colour"]
- .describe( "should output be colourised" )
- .bind( &setUseColour, "yes|no" );
-
cli["--libidentify"]
.describe( "report name and version according to libidentify standard" )
.bind( &ConfigData::libIdentify );
@@ -7215,7 +7214,7 @@ namespace Catch {
namespace Catch {
struct RandomNumberGenerator {
- typedef std::ptrdiff_t result_type;
+ typedef unsigned int result_type;
result_type operator()( result_type n ) const { return std::rand() % n; }
@@ -8136,7 +8135,7 @@ namespace Catch {
std::string AssertionResult::getExpression() const {
if( isFalseTest( m_info.resultDisposition ) )
- return '!' + capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg);
+ return "!(" + capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg) + ")";
else
return capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg);
}
@@ -8394,7 +8393,7 @@ namespace Catch {
}
inline Version libraryVersion() {
- static Version version( 1, 10, 0, "", 0 );
+ static Version version( 1, 11, 0, "", 0 );
return version;
}