11/*
2- * Catch v1.2.0
3- * Generated: 2015-06-29 08:12:52.943445
2+ * Catch v1.2.1
3+ * Generated: 2015-06-30 18:23:27.961086
44 * ----------------------------------------------------------
55 * This file has been merged from multiple headers. Please don't edit it directly
66 * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
8787
8888// CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported?
8989
90- // CATCH_CONFIG_SFINAE : is basic (C++03) SFINAE supported?
9190// CATCH_CONFIG_VARIADIC_MACROS : are variadic macros supported?
9291
93- // A lot of this code is based on Boost (1.53)
92+ // In general each macro has a _NO_<feature name> form
93+ // (e.g. CATCH_CONFIG_CPP11_NO_NULLPTR) which disables the feature.
94+ // Many features, at point of detection, define an _INTERNAL_ macro, so they
95+ // can be combined, en-mass, with the _NO_ forms later.
96+
97+ // All the C++11 features can be disabled with CATCH_CONFIG_NO_CPP11
9498
9599#ifdef __clang__
96100
97101# if __has_feature(cxx_nullptr)
98- # define CATCH_CONFIG_CPP11_NULLPTR
102+ # define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
99103# endif
100104
101105# if __has_feature(cxx_noexcept)
102- # define CATCH_CONFIG_CPP11_NOEXCEPT
106+ # define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
103107# endif
104108
105109#endif // __clang__
108112// Borland
109113#ifdef __BORLANDC__
110114
111- #if (__BORLANDC__ > 0x582 )
112- // #define CATCH_CONFIG_SFINAE // Not confirmed
113- #endif
114-
115115#endif // __BORLANDC__
116116
117117// //////////////////////////////////////////////////////////////////////////////
118118// EDG
119119#ifdef __EDG_VERSION__
120120
121- #if (__EDG_VERSION__ > 238 )
122- // #define CATCH_CONFIG_SFINAE // Not confirmed
123- #endif
124-
125121#endif // __EDG_VERSION__
126122
127123// //////////////////////////////////////////////////////////////////////////////
128124// Digital Mars
129125#ifdef __DMC__
130126
131- #if (__DMC__ > 0x840 )
132- // #define CATCH_CONFIG_SFINAE // Not confirmed
133- #endif
134-
135127#endif // __DMC__
136128
137129// //////////////////////////////////////////////////////////////////////////////
138130// GCC
139131#ifdef __GNUC__
140132
141- #if __GNUC__ < 3
142-
143- #if (__GNUC_MINOR__ >= 96 )
144- // #define CATCH_CONFIG_SFINAE
145- #endif
146-
147- #elif __GNUC__ >= 3
148-
149- // #define CATCH_CONFIG_SFINAE // Taking this out completely for now
150-
151- #endif // __GNUC__ < 3
152-
153133#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) )
154-
155- #define CATCH_CONFIG_CPP11_NULLPTR
134+ # define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
156135#endif
157136
158137#endif // __GNUC__
161140// Visual C++
162141#ifdef _MSC_VER
163142
164- #if (_MSC_VER >= 1310 ) // (VC++ 7.0+)
165- // #define CATCH_CONFIG_SFINAE // Not confirmed
166- #endif
167-
168143#if (_MSC_VER >= 1600)
169- #define CATCH_CONFIG_CPP11_NULLPTR
144+ # define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
170145#endif
171146
172147#if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015))
173- #define CATCH_CONFIG_CPP11_NOEXCEPT
174- #define CATCH_CONFIG_CPP11_GENERATED_METHODS
148+ #define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
149+ #define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
175150#endif
176151
177152#endif // _MSC_VER
182157 ( defined __GNUC__ && __GNUC__ >= 3 ) || \
183158 ( !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L )
184159
185- #ifndef CATCH_CONFIG_NO_VARIADIC_MACROS
186- #define CATCH_CONFIG_VARIADIC_MACROS
187- #endif
160+ #define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
188161
189162#endif
190163
196169
197170# define CATCH_CPP11_OR_GREATER
198171
199- # ifndef CATCH_CONFIG_CPP11_NULLPTR
200- # define CATCH_CONFIG_CPP11_NULLPTR
201- # endif
202-
203- # ifndef CATCH_CONFIG_CPP11_NOEXCEPT
204- # define CATCH_CONFIG_CPP11_NOEXCEPT
172+ # if !defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR)
173+ # define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
205174# endif
206175
207- # ifndef CATCH_CONFIG_CPP11_GENERATED_METHODS
208- # define CATCH_CONFIG_CPP11_GENERATED_METHODS
176+ # ifndef CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
177+ # define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
209178# endif
210179
211- # ifndef CATCH_CONFIG_CPP11_IS_ENUM
212- # define CATCH_CONFIG_CPP11_IS_ENUM
180+ # ifndef CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
181+ # define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
213182# endif
214183
215- # ifndef CATCH_CONFIG_CPP11_TUPLE
216- # define CATCH_CONFIG_CPP11_TUPLE
184+ # ifndef CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM
185+ # define CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM
217186# endif
218187
219- # ifndef CATCH_CONFIG_SFINAE
220- // # define CATCH_CONFIG_SFINAE // Don't use, for now
188+ # ifndef CATCH_INTERNAL_CONFIG_CPP11_TUPLE
189+ # define CATCH_INTERNAL_CONFIG_CPP11_TUPLE
221190# endif
222191
223- # ifndef CATCH_CONFIG_VARIADIC_MACROS
224- # define CATCH_CONFIG_VARIADIC_MACROS
192+ # ifndef CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
193+ # define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
225194# endif
226195
227196#endif // __cplusplus >= 201103L
228197
198+ // Now set the actual defines based on the above + anything the user has configured
199+ #if defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NO_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_NO_CPP11)
200+ # define CATCH_CONFIG_CPP11_NULLPTR
201+ #endif
202+ #if defined(CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NO_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_NO_CPP11)
203+ # define CATCH_CONFIG_CPP11_NOEXCEPT
204+ #endif
205+ #if defined(CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS) && !defined(CATCH_CONFIG_CPP11_NO_GENERATED_METHODS) && !defined(CATCH_CONFIG_CPP11_GENERATED_METHODS) && !defined(CATCH_CONFIG_NO_CPP11)
206+ # define CATCH_CONFIG_CPP11_GENERATED_METHODS
207+ #endif
208+ #if defined(CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM) && !defined(CATCH_CONFIG_CPP11_NO_IS_ENUM) && !defined(CATCH_CONFIG_CPP11_IS_ENUM) && !defined(CATCH_CONFIG_NO_CPP11)
209+ # define CATCH_CONFIG_CPP11_IS_ENUM
210+ #endif
211+ #if defined(CATCH_INTERNAL_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_CPP11_NO_TUPLE) && !defined(CATCH_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_NO_CPP11)
212+ # define CATCH_CONFIG_CPP11_TUPLE
213+ #endif
214+ #if defined(CATCH_INTERNAL_CONFIG_VARIADIC_MACROS) && !defined(CATCH_CONFIG_NO_VARIADIC_MACROS) && !defined(CATCH_CONFIG_VARIADIC_MACROS)
215+ #define CATCH_CONFIG_VARIADIC_MACROS
216+ #endif
217+
229218// noexcept support:
230219#if defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_NOEXCEPT)
231220# define CATCH_NOEXCEPT noexcept
@@ -1022,40 +1011,6 @@ namespace Internal {
10221011// #included from: catch_tostring.h
10231012#define TWOBLUECUBES_CATCH_TOSTRING_H_INCLUDED
10241013
1025- // #included from: catch_sfinae.hpp
1026- #define TWOBLUECUBES_CATCH_SFINAE_HPP_INCLUDED
1027-
1028- // Try to detect if the current compiler supports SFINAE
1029-
1030- namespace Catch {
1031-
1032- struct TrueType {
1033- static const bool value = true ;
1034- typedef void Enable;
1035- char sizer[1 ];
1036- };
1037- struct FalseType {
1038- static const bool value = false ;
1039- typedef void Disable;
1040- char sizer[2 ];
1041- };
1042-
1043- #ifdef CATCH_CONFIG_SFINAE
1044-
1045- template <bool > struct NotABooleanExpression ;
1046-
1047- template <bool c> struct If : NotABooleanExpression<c> {};
1048- template <> struct If <true > : TrueType {};
1049- template <> struct If <false > : FalseType {};
1050-
1051- template <int size> struct SizedIf ;
1052- template <> struct SizedIf <sizeof (TrueType)> : TrueType {};
1053- template <> struct SizedIf <sizeof (FalseType)> : FalseType {};
1054-
1055- #endif // CATCH_CONFIG_SFINAE
1056-
1057- } // end namespace Catch
1058-
10591014#include < sstream>
10601015#include < iomanip>
10611016#include < limits>
@@ -1154,32 +1109,13 @@ namespace Detail {
11541109
11551110 extern std::string unprintableString;
11561111
1157- // SFINAE is currently disabled by default for all compilers.
1158- // If the non SFINAE version of IsStreamInsertable is ambiguous for you
1159- // and your compiler supports SFINAE, try #defining CATCH_CONFIG_SFINAE
1160- #ifdef CATCH_CONFIG_SFINAE
1161-
1162- template <typename T>
1163- class IsStreamInsertableHelper {
1164- template <int N> struct TrueIfSizeable : TrueType {};
1165-
1166- template <typename T2>
1167- static TrueIfSizeable<sizeof ((*(std::ostream*)0 ) << *((T2 const *)0 ))> dummy (T2*);
1168- static FalseType dummy (...);
1169-
1170- public:
1171- typedef SizedIf<sizeof (dummy((T*)0 ))> type;
1172- };
1173-
1174- template <typename T>
1175- struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {};
1176-
1177- #else
1178-
11791112 struct BorgType {
11801113 template <typename T> BorgType ( T const & );
11811114 };
11821115
1116+ struct TrueType { char sizer[1 ]; };
1117+ struct FalseType { char sizer[2 ]; };
1118+
11831119 TrueType& testStreamable ( std::ostream& );
11841120 FalseType testStreamable ( FalseType );
11851121
@@ -1192,8 +1128,6 @@ namespace Detail {
11921128 enum { value = sizeof ( testStreamable (s << t) ) == sizeof ( TrueType ) };
11931129 };
11941130
1195- #endif
1196-
11971131#if defined(CATCH_CONFIG_CPP11_IS_ENUM)
11981132 template <typename T,
11991133 bool IsEnum = std::is_enum<T>::value
@@ -5016,32 +4950,15 @@ namespace SectionTracking {
50164950
50174951 RunState runState () const { return m_runState; }
50184952
5019- TrackedSection* findChild ( std::string const & childName ) {
5020- TrackedSections::iterator it = m_children.find ( childName );
5021- return it != m_children.end ()
5022- ? &it->second
5023- : NULL ;
5024- }
5025- TrackedSection* acquireChild ( std::string const & childName ) {
5026- if ( TrackedSection* child = findChild ( childName ) )
5027- return child;
5028- m_children.insert ( std::make_pair ( childName, TrackedSection ( childName, this ) ) );
5029- return findChild ( childName );
5030- }
4953+ TrackedSection* findChild ( std::string const & childName );
4954+ TrackedSection* acquireChild ( std::string const & childName );
4955+
50314956 void enter () {
50324957 if ( m_runState == NotStarted )
50334958 m_runState = Executing;
50344959 }
5035- void leave () {
5036- for ( TrackedSections::const_iterator it = m_children.begin (), itEnd = m_children.end ();
5037- it != itEnd;
5038- ++it )
5039- if ( it->second .runState () != Completed ) {
5040- m_runState = ExecutingChildren;
5041- return ;
5042- }
5043- m_runState = Completed;
5044- }
4960+ void leave ();
4961+
50454962 TrackedSection* getParent () {
50464963 return m_parent;
50474964 }
@@ -5054,9 +4971,31 @@ namespace SectionTracking {
50544971 RunState m_runState;
50554972 TrackedSections m_children;
50564973 TrackedSection* m_parent;
5057-
50584974 };
50594975
4976+ inline TrackedSection* TrackedSection::findChild ( std::string const & childName ) {
4977+ TrackedSections::iterator it = m_children.find ( childName );
4978+ return it != m_children.end ()
4979+ ? &it->second
4980+ : NULL ;
4981+ }
4982+ inline TrackedSection* TrackedSection::acquireChild ( std::string const & childName ) {
4983+ if ( TrackedSection* child = findChild ( childName ) )
4984+ return child;
4985+ m_children.insert ( std::make_pair ( childName, TrackedSection ( childName, this ) ) );
4986+ return findChild ( childName );
4987+ }
4988+ inline void TrackedSection::leave () {
4989+ for ( TrackedSections::const_iterator it = m_children.begin (), itEnd = m_children.end ();
4990+ it != itEnd;
4991+ ++it )
4992+ if ( it->second .runState () != Completed ) {
4993+ m_runState = ExecutingChildren;
4994+ return ;
4995+ }
4996+ m_runState = Completed;
4997+ }
4998+
50604999 class TestCaseTracker {
50615000 public:
50625001 TestCaseTracker ( std::string const & testCaseName )
@@ -6828,7 +6767,7 @@ namespace Catch {
68286767 return os;
68296768 }
68306769
6831- Version libraryVersion ( 1 , 2 , 0 , " " , 0 );
6770+ Version libraryVersion ( 1 , 2 , 1 , " " , 0 );
68326771
68336772}
68346773
0 commit comments