|
1 | 1 | /* |
2 | | - * Catch v1.10.0 |
3 | | - * Generated: 2017-08-26 15:16:46.676990 |
| 2 | + * Catch v1.11.0 |
| 3 | + * Generated: 2017-10-31 13:42:42.914833 |
4 | 4 | * ---------------------------------------------------------- |
5 | 5 | * This file has been merged from multiple headers. Please don't edit it directly |
6 | 6 | * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. |
|
228 | 228 | ( defined __GNUC__ && ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 )) ) || \ |
229 | 229 | ( defined __clang__ && __clang_major__ >= 3 ) |
230 | 230 |
|
231 | | -#define CATCH_INTERNAL_CONFIG_COUNTER |
| 231 | +// Use of __COUNTER__ is suppressed during code analysis in CLion/AppCode 2017.2.x and former, |
| 232 | +// because __COUNTER__ is not properly handled by it. |
| 233 | +// This does not affect compilation |
| 234 | +#if ( !defined __JETBRAINS_IDE__ || __JETBRAINS_IDE__ >= 20170300L ) |
| 235 | + #define CATCH_INTERNAL_CONFIG_COUNTER |
| 236 | +#endif |
232 | 237 |
|
233 | 238 | #endif |
234 | 239 |
|
|
309 | 314 | #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) |
310 | 315 | # define CATCH_CONFIG_CPP11_UNIQUE_PTR |
311 | 316 | #endif |
312 | | -// Use of __COUNTER__ is suppressed if __JETBRAINS_IDE__ is #defined (meaning we're being parsed by a JetBrains IDE for |
313 | | -// analytics) because, at time of writing, __COUNTER__ is not properly handled by it. |
314 | | -// This does not affect compilation |
315 | | -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) && !defined(__JETBRAINS_IDE__) |
| 317 | +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) |
316 | 318 | # define CATCH_CONFIG_COUNTER |
317 | 319 | #endif |
318 | 320 | #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 { |
2756 | 2758 | if (relativeOK) { |
2757 | 2759 | return true; |
2758 | 2760 | } |
2759 | | - return std::fabs(lhs_v - rhs.m_value) < rhs.m_margin; |
| 2761 | + |
| 2762 | + return std::fabs(lhs_v - rhs.m_value) <= rhs.m_margin; |
2760 | 2763 | } |
2761 | 2764 |
|
2762 | 2765 | template <typename T, typename = typename std::enable_if<std::is_constructible<double, T>::value>::type> |
@@ -2828,7 +2831,7 @@ namespace Detail { |
2828 | 2831 | if (relativeOK) { |
2829 | 2832 | return true; |
2830 | 2833 | } |
2831 | | - return std::fabs(lhs - rhs.m_value) < rhs.m_margin; |
| 2834 | + return std::fabs(lhs - rhs.m_value) <= rhs.m_margin; |
2832 | 2835 | } |
2833 | 2836 |
|
2834 | 2837 | friend bool operator == ( Approx const& lhs, double rhs ) { |
@@ -5279,10 +5282,6 @@ namespace Catch { |
5279 | 5282 | .describe( "should output be colourised" ) |
5280 | 5283 | .bind( &setUseColour, "yes|no" ); |
5281 | 5284 |
|
5282 | | - cli["--use-colour"] |
5283 | | - .describe( "should output be colourised" ) |
5284 | | - .bind( &setUseColour, "yes|no" ); |
5285 | | - |
5286 | 5285 | cli["--libidentify"] |
5287 | 5286 | .describe( "report name and version according to libidentify standard" ) |
5288 | 5287 | .bind( &ConfigData::libIdentify ); |
@@ -7215,7 +7214,7 @@ namespace Catch { |
7215 | 7214 | namespace Catch { |
7216 | 7215 |
|
7217 | 7216 | struct RandomNumberGenerator { |
7218 | | - typedef std::ptrdiff_t result_type; |
| 7217 | + typedef unsigned int result_type; |
7219 | 7218 |
|
7220 | 7219 | result_type operator()( result_type n ) const { return std::rand() % n; } |
7221 | 7220 |
|
@@ -8136,7 +8135,7 @@ namespace Catch { |
8136 | 8135 |
|
8137 | 8136 | std::string AssertionResult::getExpression() const { |
8138 | 8137 | if( isFalseTest( m_info.resultDisposition ) ) |
8139 | | - return '!' + capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg); |
| 8138 | + return "!(" + capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg) + ")"; |
8140 | 8139 | else |
8141 | 8140 | return capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg); |
8142 | 8141 | } |
@@ -8394,7 +8393,7 @@ namespace Catch { |
8394 | 8393 | } |
8395 | 8394 |
|
8396 | 8395 | inline Version libraryVersion() { |
8397 | | - static Version version( 1, 10, 0, "", 0 ); |
| 8396 | + static Version version( 1, 11, 0, "", 0 ); |
8398 | 8397 | return version; |
8399 | 8398 | } |
8400 | 8399 |
|
|
0 commit comments