1
1
/*
2
- * Catch v1.7.0
3
- * Generated: 2017-02-01 21:32:13.239291
2
+ * Catch v1.7.1
3
+ * Generated: 2017-02-07 09:44:56.263047
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.
81
81
82
82
// CATCH_CONFIG_VARIADIC_MACROS : are variadic macros supported?
83
83
// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported?
84
+ // CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported?
84
85
// ****************
85
86
// Note to maintainers: if new toggles are added please document them
86
87
// in configuration.md, too
160
161
// Visual C++
161
162
#ifdef _MSC_VER
162
163
164
+ #define CATCH_INTERNAL_CONFIG_WINDOWS_SEH
165
+
163
166
#if (_MSC_VER >= 1600)
164
167
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
165
168
# define CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR
284
287
# if defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_NO_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_NO_CPP11)
285
288
# define CATCH_CONFIG_CPP11_TYPE_TRAITS
286
289
# endif
290
+ #if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH)
291
+ # define CATCH_CONFIG_WINDOWS_SEH
292
+ #endif
287
293
288
294
#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)
289
295
# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
@@ -1878,45 +1884,45 @@ class ExpressionLhs : public DecomposedExpression {
1878
1884
1879
1885
template <typename RhsT>
1880
1886
BinaryExpression<T, Internal::IsEqualTo, RhsT const &>
1881
- operator == ( RhsT const & rhs ) const {
1887
+ operator == ( RhsT const & rhs ) {
1882
1888
return captureExpression<Internal::IsEqualTo>( rhs );
1883
1889
}
1884
1890
1885
1891
template <typename RhsT>
1886
1892
BinaryExpression<T, Internal::IsNotEqualTo, RhsT const &>
1887
- operator != ( RhsT const & rhs ) const {
1893
+ operator != ( RhsT const & rhs ) {
1888
1894
return captureExpression<Internal::IsNotEqualTo>( rhs );
1889
1895
}
1890
1896
1891
1897
template <typename RhsT>
1892
1898
BinaryExpression<T, Internal::IsLessThan, RhsT const &>
1893
- operator < ( RhsT const & rhs ) const {
1899
+ operator < ( RhsT const & rhs ) {
1894
1900
return captureExpression<Internal::IsLessThan>( rhs );
1895
1901
}
1896
1902
1897
1903
template <typename RhsT>
1898
1904
BinaryExpression<T, Internal::IsGreaterThan, RhsT const &>
1899
- operator > ( RhsT const & rhs ) const {
1905
+ operator > ( RhsT const & rhs ) {
1900
1906
return captureExpression<Internal::IsGreaterThan>( rhs );
1901
1907
}
1902
1908
1903
1909
template <typename RhsT>
1904
1910
BinaryExpression<T, Internal::IsLessThanOrEqualTo, RhsT const &>
1905
- operator <= ( RhsT const & rhs ) const {
1911
+ operator <= ( RhsT const & rhs ) {
1906
1912
return captureExpression<Internal::IsLessThanOrEqualTo>( rhs );
1907
1913
}
1908
1914
1909
1915
template <typename RhsT>
1910
1916
BinaryExpression<T, Internal::IsGreaterThanOrEqualTo, RhsT const &>
1911
- operator >= ( RhsT const & rhs ) const {
1917
+ operator >= ( RhsT const & rhs ) {
1912
1918
return captureExpression<Internal::IsGreaterThanOrEqualTo>( rhs );
1913
1919
}
1914
1920
1915
- BinaryExpression<T, Internal::IsEqualTo, bool > operator == ( bool rhs ) const {
1921
+ BinaryExpression<T, Internal::IsEqualTo, bool > operator == ( bool rhs ) {
1916
1922
return captureExpression<Internal::IsEqualTo>( rhs );
1917
1923
}
1918
1924
1919
- BinaryExpression<T, Internal::IsNotEqualTo, bool > operator != ( bool rhs ) const {
1925
+ BinaryExpression<T, Internal::IsNotEqualTo, bool > operator != ( bool rhs ) {
1920
1926
return captureExpression<Internal::IsNotEqualTo>( rhs );
1921
1927
}
1922
1928
@@ -6117,12 +6123,40 @@ namespace Catch {
6117
6123
} // namespace Catch
6118
6124
6119
6125
#if defined ( CATCH_PLATFORM_WINDOWS ) // ///////////////////////////////////////
6126
+ // #included from: catch_windows_h_proxy.h
6127
+
6128
+ #define TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED
6129
+
6130
+ #ifdef CATCH_DEFINES_NOMINMAX
6131
+ # define NOMINMAX
6132
+ #endif
6133
+ #ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN
6134
+ # define WIN32_LEAN_AND_MEAN
6135
+ #endif
6120
6136
6121
- #define NOMINMAX
6122
- #define WIN32_LEAN_AND_MEAN
6137
+ #ifdef __AFXDLL
6138
+ #include < AfxWin.h>
6139
+ #else
6123
6140
#include < windows.h>
6124
- #undef WIN32_LEAN_AND_MEAN
6125
- #undef NOMINMAX
6141
+ #endif
6142
+
6143
+ #ifdef CATCH_DEFINES_NOMINMAX
6144
+ # undef NOMINMAX
6145
+ #endif
6146
+ #ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN
6147
+ # undef WIN32_LEAN_AND_MEAN
6148
+ #endif
6149
+
6150
+
6151
+ # if !defined ( CATCH_CONFIG_WINDOWS_SEH )
6152
+
6153
+ namespace Catch {
6154
+ struct FatalConditionHandler {
6155
+ void reset () {}
6156
+ };
6157
+ }
6158
+
6159
+ # else // CATCH_CONFIG_WINDOWS_SEH is defined
6126
6160
6127
6161
namespace Catch {
6128
6162
@@ -6143,6 +6177,7 @@ namespace Catch {
6143
6177
static LONG CALLBACK handleVectoredException (PEXCEPTION_POINTERS ExceptionInfo) {
6144
6178
for (int i = 0 ; i < sizeof (signalDefs) / sizeof (SignalDefs); ++i) {
6145
6179
if (ExceptionInfo->ExceptionRecord ->ExceptionCode == signalDefs[i].id ) {
6180
+ reset ();
6146
6181
reportFatal (signalDefs[i].name );
6147
6182
}
6148
6183
}
@@ -6151,36 +6186,45 @@ namespace Catch {
6151
6186
return EXCEPTION_CONTINUE_SEARCH;
6152
6187
}
6153
6188
6154
- // 32k seems enough for Catch to handle stack overflow,
6155
- // but the value was found experimentally, so there is no strong guarantee
6156
- FatalConditionHandler ():m_isSet(true ), m_guaranteeSize(32 * 1024 ), m_exceptionHandlerHandle(CATCH_NULL) {
6189
+ FatalConditionHandler () {
6190
+ isSet = true ;
6191
+ // 32k seems enough for Catch to handle stack overflow,
6192
+ // but the value was found experimentally, so there is no strong guarantee
6193
+ guaranteeSize = 32 * 1024 ;
6194
+ exceptionHandlerHandle = CATCH_NULL;
6157
6195
// Register as first handler in current chain
6158
- m_exceptionHandlerHandle = AddVectoredExceptionHandler (1 , handleVectoredException);
6196
+ exceptionHandlerHandle = AddVectoredExceptionHandler (1 , handleVectoredException);
6159
6197
// Pass in guarantee size to be filled
6160
- SetThreadStackGuarantee (&m_guaranteeSize );
6198
+ SetThreadStackGuarantee (&guaranteeSize );
6161
6199
}
6162
6200
6163
- void reset () {
6164
- if (m_isSet ) {
6201
+ static void reset () {
6202
+ if (isSet ) {
6165
6203
// Unregister handler and restore the old guarantee
6166
- RemoveVectoredExceptionHandler (m_exceptionHandlerHandle );
6167
- SetThreadStackGuarantee (&m_guaranteeSize );
6168
- m_exceptionHandlerHandle = CATCH_NULL;
6169
- m_isSet = false ;
6204
+ RemoveVectoredExceptionHandler (exceptionHandlerHandle );
6205
+ SetThreadStackGuarantee (&guaranteeSize );
6206
+ exceptionHandlerHandle = CATCH_NULL;
6207
+ isSet = false ;
6170
6208
}
6171
6209
}
6172
6210
6173
6211
~FatalConditionHandler () {
6174
6212
reset ();
6175
6213
}
6176
6214
private:
6177
- bool m_isSet ;
6178
- ULONG m_guaranteeSize ;
6179
- PVOID m_exceptionHandlerHandle ;
6215
+ static bool isSet ;
6216
+ static ULONG guaranteeSize ;
6217
+ static PVOID exceptionHandlerHandle ;
6180
6218
};
6181
6219
6220
+ bool FatalConditionHandler::isSet = false ;
6221
+ ULONG FatalConditionHandler::guaranteeSize = 0 ;
6222
+ PVOID FatalConditionHandler::exceptionHandlerHandle = CATCH_NULL;
6223
+
6182
6224
} // namespace Catch
6183
6225
6226
+ # endif // CATCH_CONFIG_WINDOWS_SEH
6227
+
6184
6228
#else // Not Windows - assumed to be POSIX compatible //////////////////////////
6185
6229
6186
6230
#include < signal.h>
@@ -7440,30 +7484,6 @@ namespace Catch {
7440
7484
7441
7485
#if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) // ///////////////////////////////////////
7442
7486
7443
- // #included from: catch_windows_h_proxy.h
7444
-
7445
- #define TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED
7446
-
7447
- #ifdef CATCH_DEFINES_NOMINMAX
7448
- # define NOMINMAX
7449
- #endif
7450
- #ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN
7451
- # define WIN32_LEAN_AND_MEAN
7452
- #endif
7453
-
7454
- #ifdef __AFXDLL
7455
- #include < AfxWin.h>
7456
- #else
7457
- #include < windows.h>
7458
- #endif
7459
-
7460
- #ifdef CATCH_DEFINES_NOMINMAX
7461
- # undef NOMINMAX
7462
- #endif
7463
- #ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN
7464
- # undef WIN32_LEAN_AND_MEAN
7465
- #endif
7466
-
7467
7487
namespace Catch {
7468
7488
namespace {
7469
7489
@@ -7989,7 +8009,7 @@ namespace Catch {
7989
8009
return os;
7990
8010
}
7991
8011
7992
- Version libraryVersion ( 1 , 7 , 0 , " " , 0 );
8012
+ Version libraryVersion ( 1 , 7 , 1 , " " , 0 );
7993
8013
7994
8014
}
7995
8015
@@ -9506,12 +9526,13 @@ namespace Catch {
9506
9526
newlineIfNecessary ();
9507
9527
m_indent = m_indent.substr ( 0 , m_indent.size ()-2 );
9508
9528
if ( m_tagIsOpen ) {
9509
- stream () << " />\n " ;
9529
+ stream () << " />" ;
9510
9530
m_tagIsOpen = false ;
9511
9531
}
9512
9532
else {
9513
- stream () << m_indent << " </" << m_tags.back () << " >\n " ;
9533
+ stream () << m_indent << " </" << m_tags.back () << " >" ;
9514
9534
}
9535
+ stream () << std::endl;
9515
9536
m_tags.pop_back ();
9516
9537
return *this ;
9517
9538
}
@@ -9757,6 +9778,11 @@ namespace Catch {
9757
9778
if ( m_config->showDurations () == ShowDurations::Always )
9758
9779
e.writeAttribute ( " durationInSeconds" , m_testCaseTimer.getElapsedSeconds () );
9759
9780
9781
+ if ( !testCaseStats.stdOut .empty () )
9782
+ m_xml.scopedElement ( " StdOut" ).writeText ( trim ( testCaseStats.stdOut ), false );
9783
+ if ( !testCaseStats.stdErr .empty () )
9784
+ m_xml.scopedElement ( " StdErr" ).writeText ( trim ( testCaseStats.stdErr ), false );
9785
+
9760
9786
m_xml.endElement ();
9761
9787
}
9762
9788
@@ -9804,7 +9830,7 @@ namespace Catch {
9804
9830
std::time (&rawtime);
9805
9831
const size_t timeStampSize = sizeof (" 2017-01-16T17:06:45Z" );
9806
9832
9807
- #ifdef CATCH_PLATFORM_WINDOWS
9833
+ #ifdef _MSC_VER
9808
9834
std::tm timeInfo = {};
9809
9835
gmtime_s (&timeInfo, &rawtime);
9810
9836
#else
@@ -9815,7 +9841,7 @@ namespace Catch {
9815
9841
char timeStamp[timeStampSize];
9816
9842
const char * const fmt = " %Y-%m-%dT%H:%M:%SZ" ;
9817
9843
9818
- #ifdef CATCH_PLATFORM_WINDOWS
9844
+ #ifdef _MSC_VER
9819
9845
std::strftime (timeStamp, timeStampSize, fmt, &timeInfo);
9820
9846
#else
9821
9847
std::strftime (timeStamp, timeStampSize, fmt, timeInfo);
0 commit comments