mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
build for v1.2.1
This commit is contained in:
parent
6d5797231c
commit
3b18d9e962
@ -1,6 +1,6 @@
|
|||||||
![catch logo](catch-logo-small.png)
|
![catch logo](catch-logo-small.png)
|
||||||
|
|
||||||
*v1.2.0*
|
*v1.2.1*
|
||||||
|
|
||||||
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
|
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace Catch {
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
Version libraryVersion( 1, 2, 0, "", 0 );
|
Version libraryVersion( 1, 2, 1, "", 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Catch v1.2.0
|
* Catch v1.2.1
|
||||||
* Generated: 2015-06-29 08:12:52.943445
|
* Generated: 2015-06-30 18:23:27.961086
|
||||||
* ----------------------------------------------------------
|
* ----------------------------------------------------------
|
||||||
* This file has been merged from multiple headers. Please don't edit it directly
|
* This file has been merged from multiple headers. Please don't edit it directly
|
||||||
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
||||||
@ -87,19 +87,23 @@
|
|||||||
|
|
||||||
// CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported?
|
// CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported?
|
||||||
|
|
||||||
// CATCH_CONFIG_SFINAE : is basic (C++03) SFINAE supported?
|
|
||||||
// CATCH_CONFIG_VARIADIC_MACROS : are variadic macros supported?
|
// CATCH_CONFIG_VARIADIC_MACROS : are variadic macros supported?
|
||||||
|
|
||||||
// A lot of this code is based on Boost (1.53)
|
// In general each macro has a _NO_<feature name> form
|
||||||
|
// (e.g. CATCH_CONFIG_CPP11_NO_NULLPTR) which disables the feature.
|
||||||
|
// Many features, at point of detection, define an _INTERNAL_ macro, so they
|
||||||
|
// can be combined, en-mass, with the _NO_ forms later.
|
||||||
|
|
||||||
|
// All the C++11 features can be disabled with CATCH_CONFIG_NO_CPP11
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
|
|
||||||
# if __has_feature(cxx_nullptr)
|
# if __has_feature(cxx_nullptr)
|
||||||
# define CATCH_CONFIG_CPP11_NULLPTR
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if __has_feature(cxx_noexcept)
|
# if __has_feature(cxx_noexcept)
|
||||||
# define CATCH_CONFIG_CPP11_NOEXCEPT
|
# define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif // __clang__
|
#endif // __clang__
|
||||||
@ -108,51 +112,26 @@
|
|||||||
// Borland
|
// Borland
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
|
|
||||||
#if (__BORLANDC__ > 0x582 )
|
|
||||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __BORLANDC__
|
#endif // __BORLANDC__
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// EDG
|
// EDG
|
||||||
#ifdef __EDG_VERSION__
|
#ifdef __EDG_VERSION__
|
||||||
|
|
||||||
#if (__EDG_VERSION__ > 238 )
|
|
||||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __EDG_VERSION__
|
#endif // __EDG_VERSION__
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Digital Mars
|
// Digital Mars
|
||||||
#ifdef __DMC__
|
#ifdef __DMC__
|
||||||
|
|
||||||
#if (__DMC__ > 0x840 )
|
|
||||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __DMC__
|
#endif // __DMC__
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// GCC
|
// GCC
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
|
||||||
#if __GNUC__ < 3
|
|
||||||
|
|
||||||
#if (__GNUC_MINOR__ >= 96 )
|
|
||||||
//#define CATCH_CONFIG_SFINAE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif __GNUC__ >= 3
|
|
||||||
|
|
||||||
// #define CATCH_CONFIG_SFINAE // Taking this out completely for now
|
|
||||||
|
|
||||||
#endif // __GNUC__ < 3
|
|
||||||
|
|
||||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) )
|
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) )
|
||||||
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
||||||
#define CATCH_CONFIG_CPP11_NULLPTR
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
@ -161,17 +140,13 @@
|
|||||||
// Visual C++
|
// Visual C++
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
#if (_MSC_VER >= 1310 ) // (VC++ 7.0+)
|
|
||||||
//#define CATCH_CONFIG_SFINAE // Not confirmed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (_MSC_VER >= 1600)
|
#if (_MSC_VER >= 1600)
|
||||||
#define CATCH_CONFIG_CPP11_NULLPTR
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015))
|
#if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015))
|
||||||
#define CATCH_CONFIG_CPP11_NOEXCEPT
|
#define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
||||||
#define CATCH_CONFIG_CPP11_GENERATED_METHODS
|
#define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
@ -182,9 +157,7 @@
|
|||||||
( defined __GNUC__ && __GNUC__ >= 3 ) || \
|
( defined __GNUC__ && __GNUC__ >= 3 ) || \
|
||||||
( !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L )
|
( !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L )
|
||||||
|
|
||||||
#ifndef CATCH_CONFIG_NO_VARIADIC_MACROS
|
#define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
|
||||||
#define CATCH_CONFIG_VARIADIC_MACROS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -196,36 +169,52 @@
|
|||||||
|
|
||||||
# define CATCH_CPP11_OR_GREATER
|
# define CATCH_CPP11_OR_GREATER
|
||||||
|
|
||||||
# ifndef CATCH_CONFIG_CPP11_NULLPTR
|
# if !defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR)
|
||||||
# define CATCH_CONFIG_CPP11_NULLPTR
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef CATCH_CONFIG_CPP11_NOEXCEPT
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
||||||
# define CATCH_CONFIG_CPP11_NOEXCEPT
|
# define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef CATCH_CONFIG_CPP11_GENERATED_METHODS
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
|
||||||
# define CATCH_CONFIG_CPP11_GENERATED_METHODS
|
# define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef CATCH_CONFIG_CPP11_IS_ENUM
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM
|
||||||
# define CATCH_CONFIG_CPP11_IS_ENUM
|
# define CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef CATCH_CONFIG_CPP11_TUPLE
|
# ifndef CATCH_INTERNAL_CONFIG_CPP11_TUPLE
|
||||||
# define CATCH_CONFIG_CPP11_TUPLE
|
# define CATCH_INTERNAL_CONFIG_CPP11_TUPLE
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef CATCH_CONFIG_SFINAE
|
# ifndef CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
|
||||||
//# define CATCH_CONFIG_SFINAE // Don't use, for now
|
# define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef CATCH_CONFIG_VARIADIC_MACROS
|
|
||||||
# define CATCH_CONFIG_VARIADIC_MACROS
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif // __cplusplus >= 201103L
|
#endif // __cplusplus >= 201103L
|
||||||
|
|
||||||
|
// Now set the actual defines based on the above + anything the user has configured
|
||||||
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NO_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_NO_CPP11)
|
||||||
|
# define CATCH_CONFIG_CPP11_NULLPTR
|
||||||
|
#endif
|
||||||
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NO_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_NO_CPP11)
|
||||||
|
# define CATCH_CONFIG_CPP11_NOEXCEPT
|
||||||
|
#endif
|
||||||
|
#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)
|
||||||
|
# define CATCH_CONFIG_CPP11_GENERATED_METHODS
|
||||||
|
#endif
|
||||||
|
#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)
|
||||||
|
# define CATCH_CONFIG_CPP11_IS_ENUM
|
||||||
|
#endif
|
||||||
|
#if defined(CATCH_INTERNAL_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_CPP11_NO_TUPLE) && !defined(CATCH_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_NO_CPP11)
|
||||||
|
# define CATCH_CONFIG_CPP11_TUPLE
|
||||||
|
#endif
|
||||||
|
#if defined(CATCH_INTERNAL_CONFIG_VARIADIC_MACROS) && !defined(CATCH_CONFIG_NO_VARIADIC_MACROS) && !defined(CATCH_CONFIG_VARIADIC_MACROS)
|
||||||
|
#define CATCH_CONFIG_VARIADIC_MACROS
|
||||||
|
#endif
|
||||||
|
|
||||||
// noexcept support:
|
// noexcept support:
|
||||||
#if defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_NOEXCEPT)
|
#if defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_NOEXCEPT)
|
||||||
# define CATCH_NOEXCEPT noexcept
|
# define CATCH_NOEXCEPT noexcept
|
||||||
@ -1022,40 +1011,6 @@ namespace Internal {
|
|||||||
// #included from: catch_tostring.h
|
// #included from: catch_tostring.h
|
||||||
#define TWOBLUECUBES_CATCH_TOSTRING_H_INCLUDED
|
#define TWOBLUECUBES_CATCH_TOSTRING_H_INCLUDED
|
||||||
|
|
||||||
// #included from: catch_sfinae.hpp
|
|
||||||
#define TWOBLUECUBES_CATCH_SFINAE_HPP_INCLUDED
|
|
||||||
|
|
||||||
// Try to detect if the current compiler supports SFINAE
|
|
||||||
|
|
||||||
namespace Catch {
|
|
||||||
|
|
||||||
struct TrueType {
|
|
||||||
static const bool value = true;
|
|
||||||
typedef void Enable;
|
|
||||||
char sizer[1];
|
|
||||||
};
|
|
||||||
struct FalseType {
|
|
||||||
static const bool value = false;
|
|
||||||
typedef void Disable;
|
|
||||||
char sizer[2];
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef CATCH_CONFIG_SFINAE
|
|
||||||
|
|
||||||
template<bool> struct NotABooleanExpression;
|
|
||||||
|
|
||||||
template<bool c> struct If : NotABooleanExpression<c> {};
|
|
||||||
template<> struct If<true> : TrueType {};
|
|
||||||
template<> struct If<false> : FalseType {};
|
|
||||||
|
|
||||||
template<int size> struct SizedIf;
|
|
||||||
template<> struct SizedIf<sizeof(TrueType)> : TrueType {};
|
|
||||||
template<> struct SizedIf<sizeof(FalseType)> : FalseType {};
|
|
||||||
|
|
||||||
#endif // CATCH_CONFIG_SFINAE
|
|
||||||
|
|
||||||
} // end namespace Catch
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -1154,32 +1109,13 @@ namespace Detail {
|
|||||||
|
|
||||||
extern std::string unprintableString;
|
extern std::string unprintableString;
|
||||||
|
|
||||||
// SFINAE is currently disabled by default for all compilers.
|
|
||||||
// If the non SFINAE version of IsStreamInsertable is ambiguous for you
|
|
||||||
// and your compiler supports SFINAE, try #defining CATCH_CONFIG_SFINAE
|
|
||||||
#ifdef CATCH_CONFIG_SFINAE
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
class IsStreamInsertableHelper {
|
|
||||||
template<int N> struct TrueIfSizeable : TrueType {};
|
|
||||||
|
|
||||||
template<typename T2>
|
|
||||||
static TrueIfSizeable<sizeof((*(std::ostream*)0) << *((T2 const*)0))> dummy(T2*);
|
|
||||||
static FalseType dummy(...);
|
|
||||||
|
|
||||||
public:
|
|
||||||
typedef SizedIf<sizeof(dummy((T*)0))> type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {};
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
struct BorgType {
|
struct BorgType {
|
||||||
template<typename T> BorgType( T const& );
|
template<typename T> BorgType( T const& );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TrueType { char sizer[1]; };
|
||||||
|
struct FalseType { char sizer[2]; };
|
||||||
|
|
||||||
TrueType& testStreamable( std::ostream& );
|
TrueType& testStreamable( std::ostream& );
|
||||||
FalseType testStreamable( FalseType );
|
FalseType testStreamable( FalseType );
|
||||||
|
|
||||||
@ -1192,8 +1128,6 @@ namespace Detail {
|
|||||||
enum { value = sizeof( testStreamable(s << t) ) == sizeof( TrueType ) };
|
enum { value = sizeof( testStreamable(s << t) ) == sizeof( TrueType ) };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CATCH_CONFIG_CPP11_IS_ENUM)
|
#if defined(CATCH_CONFIG_CPP11_IS_ENUM)
|
||||||
template<typename T,
|
template<typename T,
|
||||||
bool IsEnum = std::is_enum<T>::value
|
bool IsEnum = std::is_enum<T>::value
|
||||||
@ -5016,32 +4950,15 @@ namespace SectionTracking {
|
|||||||
|
|
||||||
RunState runState() const { return m_runState; }
|
RunState runState() const { return m_runState; }
|
||||||
|
|
||||||
TrackedSection* findChild( std::string const& childName ) {
|
TrackedSection* findChild( std::string const& childName );
|
||||||
TrackedSections::iterator it = m_children.find( childName );
|
TrackedSection* acquireChild( std::string const& childName );
|
||||||
return it != m_children.end()
|
|
||||||
? &it->second
|
|
||||||
: NULL;
|
|
||||||
}
|
|
||||||
TrackedSection* acquireChild( std::string const& childName ) {
|
|
||||||
if( TrackedSection* child = findChild( childName ) )
|
|
||||||
return child;
|
|
||||||
m_children.insert( std::make_pair( childName, TrackedSection( childName, this ) ) );
|
|
||||||
return findChild( childName );
|
|
||||||
}
|
|
||||||
void enter() {
|
void enter() {
|
||||||
if( m_runState == NotStarted )
|
if( m_runState == NotStarted )
|
||||||
m_runState = Executing;
|
m_runState = Executing;
|
||||||
}
|
}
|
||||||
void leave() {
|
void leave();
|
||||||
for( TrackedSections::const_iterator it = m_children.begin(), itEnd = m_children.end();
|
|
||||||
it != itEnd;
|
|
||||||
++it )
|
|
||||||
if( it->second.runState() != Completed ) {
|
|
||||||
m_runState = ExecutingChildren;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_runState = Completed;
|
|
||||||
}
|
|
||||||
TrackedSection* getParent() {
|
TrackedSection* getParent() {
|
||||||
return m_parent;
|
return m_parent;
|
||||||
}
|
}
|
||||||
@ -5054,9 +4971,31 @@ namespace SectionTracking {
|
|||||||
RunState m_runState;
|
RunState m_runState;
|
||||||
TrackedSections m_children;
|
TrackedSections m_children;
|
||||||
TrackedSection* m_parent;
|
TrackedSection* m_parent;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline TrackedSection* TrackedSection::findChild( std::string const& childName ) {
|
||||||
|
TrackedSections::iterator it = m_children.find( childName );
|
||||||
|
return it != m_children.end()
|
||||||
|
? &it->second
|
||||||
|
: NULL;
|
||||||
|
}
|
||||||
|
inline TrackedSection* TrackedSection::acquireChild( std::string const& childName ) {
|
||||||
|
if( TrackedSection* child = findChild( childName ) )
|
||||||
|
return child;
|
||||||
|
m_children.insert( std::make_pair( childName, TrackedSection( childName, this ) ) );
|
||||||
|
return findChild( childName );
|
||||||
|
}
|
||||||
|
inline void TrackedSection::leave() {
|
||||||
|
for( TrackedSections::const_iterator it = m_children.begin(), itEnd = m_children.end();
|
||||||
|
it != itEnd;
|
||||||
|
++it )
|
||||||
|
if( it->second.runState() != Completed ) {
|
||||||
|
m_runState = ExecutingChildren;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
m_runState = Completed;
|
||||||
|
}
|
||||||
|
|
||||||
class TestCaseTracker {
|
class TestCaseTracker {
|
||||||
public:
|
public:
|
||||||
TestCaseTracker( std::string const& testCaseName )
|
TestCaseTracker( std::string const& testCaseName )
|
||||||
@ -6828,7 +6767,7 @@ namespace Catch {
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
Version libraryVersion( 1, 2, 0, "", 0 );
|
Version libraryVersion( 1, 2, 1, "", 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user