1
1
/*
2
- * Catch v1.9.1
3
- * Generated: 2017-04-09 21:21:06.285364
2
+ * Catch v1.9.2
3
+ * Generated: 2017-04-25 10:41:53.040184
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.
136
136
#endif // __clang__
137
137
138
138
// //////////////////////////////////////////////////////////////////////////////
139
- // Cygwin
140
- #ifdef __CYGWIN__
139
+ // We know some environments not to support full POSIX signals
140
+ #if defined( __CYGWIN__) || defined(__QNX__)
141
141
142
142
# if !defined(CATCH_CONFIG_POSIX_SIGNALS)
143
143
# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS
144
144
# endif
145
145
146
+ #endif
147
+
148
+ // //////////////////////////////////////////////////////////////////////////////
149
+ // Cygwin
150
+ #ifdef __CYGWIN__
151
+
146
152
// Required for some versions of Cygwin to declare gettimeofday
147
153
// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
148
154
# define _BSD_SOURCE
@@ -2397,14 +2403,19 @@ namespace Catch {
2397
2403
// #included from: catch_timer.h
2398
2404
#define TWOBLUECUBES_CATCH_TIMER_H_INCLUDED
2399
2405
2400
- #ifdef CATCH_PLATFORM_WINDOWS
2401
- typedef unsigned long long uint64_t ;
2406
+ #ifdef _MSC_VER
2407
+
2408
+ namespace Catch {
2409
+ typedef unsigned long long UInt64 ;
2410
+ }
2402
2411
#else
2403
2412
#include < stdint.h>
2413
+ namespace Catch {
2414
+ typedef uint64_t UInt64 ;
2415
+ }
2404
2416
#endif
2405
2417
2406
2418
namespace Catch {
2407
-
2408
2419
class Timer {
2409
2420
public:
2410
2421
Timer () : m_ticks( 0 ) {}
@@ -2414,7 +2425,7 @@ namespace Catch {
2414
2425
double getElapsedSeconds () const ;
2415
2426
2416
2427
private:
2417
- uint64_t m_ticks;
2428
+ UInt64 m_ticks;
2418
2429
};
2419
2430
2420
2431
} // namespace Catch
@@ -2769,16 +2780,17 @@ namespace Detail {
2769
2780
return Approx ( 0 );
2770
2781
}
2771
2782
2772
- Approx operator ()( double value ) {
2773
- Approx approx ( value );
2783
+ #if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
2784
+
2785
+ template <typename T, typename = typename std::enable_if<std::is_constructible<double , T>::value>::type>
2786
+ Approx operator ()( T value ) {
2787
+ Approx approx ( static_cast <double >(value) );
2774
2788
approx.epsilon ( m_epsilon );
2775
2789
approx.margin ( m_margin );
2776
2790
approx.scale ( m_scale );
2777
2791
return approx;
2778
2792
}
2779
2793
2780
- #if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
2781
-
2782
2794
template <typename T, typename = typename std::enable_if<std::is_constructible<double , T>::value>::type>
2783
2795
explicit Approx ( T value ): Approx(static_cast <double >(value))
2784
2796
{}
@@ -2828,7 +2840,35 @@ namespace Detail {
2828
2840
friend bool operator >= ( Approx const & lhs, T rhs ) {
2829
2841
return lhs.m_value > double (rhs) || lhs == rhs;
2830
2842
}
2843
+
2844
+ template <typename T, typename = typename std::enable_if<std::is_constructible<double , T>::value>::type>
2845
+ Approx& epsilon ( T newEpsilon ) {
2846
+ m_epsilon = double (newEpsilon);
2847
+ return *this ;
2848
+ }
2849
+
2850
+ template <typename T, typename = typename std::enable_if<std::is_constructible<double , T>::value>::type>
2851
+ Approx& margin ( T newMargin ) {
2852
+ m_margin = double (newMargin);
2853
+ return *this ;
2854
+ }
2855
+
2856
+ template <typename T, typename = typename std::enable_if<std::is_constructible<double , T>::value>::type>
2857
+ Approx& scale ( T newScale ) {
2858
+ m_scale = double (newScale);
2859
+ return *this ;
2860
+ }
2861
+
2831
2862
#else
2863
+
2864
+ Approx operator ()( double value ) {
2865
+ Approx approx ( value );
2866
+ approx.epsilon ( m_epsilon );
2867
+ approx.margin ( m_margin );
2868
+ approx.scale ( m_scale );
2869
+ return approx;
2870
+ }
2871
+
2832
2872
friend bool operator == ( double lhs, Approx const & rhs ) {
2833
2873
// Thanks to Richard Harris for his help refining this formula
2834
2874
bool relativeOK = std::fabs ( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( std::fabs (lhs), std::fabs (rhs.m_value ) ) );
@@ -2865,7 +2905,6 @@ namespace Detail {
2865
2905
friend bool operator >= ( Approx const & lhs, double rhs ) {
2866
2906
return lhs.m_value > rhs || lhs == rhs;
2867
2907
}
2868
- #endif
2869
2908
2870
2909
Approx& epsilon ( double newEpsilon ) {
2871
2910
m_epsilon = newEpsilon;
@@ -2881,6 +2920,7 @@ namespace Detail {
2881
2920
m_scale = newScale;
2882
2921
return *this ;
2883
2922
}
2923
+ #endif
2884
2924
2885
2925
std::string toString () const {
2886
2926
std::ostringstream oss;
@@ -3133,8 +3173,18 @@ namespace Catch {
3133
3173
}
3134
3174
3135
3175
private:
3136
- T* nullableValue;
3137
- char storage[sizeof (T)];
3176
+ T *nullableValue;
3177
+ union {
3178
+ char storage[sizeof (T)];
3179
+
3180
+ // These are here to force alignment for the storage
3181
+ long double dummy1;
3182
+ void (*dummy2)();
3183
+ long double dummy3;
3184
+ #ifdef CATCH_CONFIG_CPP11_LONG_LONG
3185
+ long long dummy4;
3186
+ #endif
3187
+ };
3138
3188
};
3139
3189
3140
3190
} // end namespace Catch
@@ -8232,7 +8282,7 @@ namespace Catch {
8232
8282
}
8233
8283
8234
8284
inline Version libraryVersion () {
8235
- static Version version ( 1 , 9 , 1 , " " , 0 );
8285
+ static Version version ( 1 , 9 , 2 , " " , 0 );
8236
8286
return version;
8237
8287
}
8238
8288
@@ -10218,7 +10268,8 @@ namespace Catch {
10218
10268
public:
10219
10269
JunitReporter ( ReporterConfig const & _config )
10220
10270
: CumulativeReporterBase( _config ),
10221
- xml ( _config.stream() )
10271
+ xml ( _config.stream() ),
10272
+ m_okToFail( false )
10222
10273
{
10223
10274
m_reporterPrefs.shouldRedirectStdOut = true ;
10224
10275
}
@@ -10244,8 +10295,11 @@ namespace Catch {
10244
10295
CumulativeReporterBase::testGroupStarting ( groupInfo );
10245
10296
}
10246
10297
10298
+ virtual void testCaseStarting ( TestCaseInfo const & testCaseInfo ) CATCH_OVERRIDE {
10299
+ m_okToFail = testCaseInfo.okToFail ();
10300
+ }
10247
10301
virtual bool assertionEnded ( AssertionStats const & assertionStats ) CATCH_OVERRIDE {
10248
- if ( assertionStats.assertionResult .getResultType () == ResultWas::ThrewException )
10302
+ if ( assertionStats.assertionResult .getResultType () == ResultWas::ThrewException && !m_okToFail )
10249
10303
unexpectedExceptions++;
10250
10304
return CumulativeReporterBase::assertionEnded ( assertionStats );
10251
10305
}
@@ -10410,6 +10464,7 @@ namespace Catch {
10410
10464
std::ostringstream stdOutForSuite;
10411
10465
std::ostringstream stdErrForSuite;
10412
10466
unsigned int unexpectedExceptions;
10467
+ bool m_okToFail;
10413
10468
};
10414
10469
10415
10470
INTERNAL_CATCH_REGISTER_REPORTER ( " junit" , JunitReporter )
0 commit comments