Showing preview only (761K chars total). Download the full file or copy to clipboard to get everything.
Repository: cheind/inpaint
Branch: master
Commit: a5d3aa5eede1
Files: 34
Total size: 737.0 KB
Directory structure:
gitextract_p9wjmytm/
├── .gitattributes
├── CMakeLists.txt
├── COPYING
├── README.md
├── benchmarks/
│ ├── catch.hpp
│ └── patch.cpp
├── examples/
│ ├── inpaint_image_criminisi.cpp
│ └── patch_match.cpp
├── inc/
│ └── inpaint/
│ ├── criminisi_inpainter.h
│ ├── gradient.h
│ ├── integral.h
│ ├── mean_shift.h
│ ├── patch.h
│ ├── patch_match.h
│ ├── pyramid.h
│ ├── stats.h
│ ├── template_match_candidates.h
│ └── timer.h
├── photos/
│ └── CREATIVE COMMONS.txt
├── src/
│ ├── criminisi_inpainter.cpp
│ ├── mean_shift.cpp
│ ├── patch_match.cpp
│ ├── pyramid.cpp
│ └── template_match_candidates.cpp
└── tests/
├── catch.hpp
├── criminisi_inpainter.cpp
├── gradient.cpp
├── integral.cpp
├── mean_shift.cpp
├── patch.cpp
├── patch_match.cpp
├── pyramid.cpp
├── random_testdata.h
└── template_match_candidates.cpp
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 2.8)
project(inpainting)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS} "inc")
if(CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
endif()
else()
set(CMAKE_CXX_STANDARD 11)
endif()
if (WIN32)
add_definitions("-D_SCL_SECURE_NO_WARNINGS")
endif()
# Library
add_library(inpaint
inc/inpaint/stats.h
inc/inpaint/patch.h
inc/inpaint/gradient.h
inc/inpaint/integral.h
inc/inpaint/timer.h
inc/inpaint/criminisi_inpainter.h
inc/inpaint/template_match_candidates.h
inc/inpaint/patch_match.h
src/criminisi_inpainter.cpp
src/template_match_candidates.cpp
src/patch_match.cpp
)
target_link_libraries(inpaint ${OpenCV_LIBRARIES})
# Samples
add_executable(inpaint_image_criminisi examples/inpaint_image_criminisi.cpp)
target_link_libraries(inpaint_image_criminisi inpaint ${OpenCV_LIBRARIES})
add_executable(patch_match examples/patch_match.cpp)
target_link_libraries(patch_match inpaint ${OpenCV_LIBRARIES})
# Tests
include_directories("tests")
add_executable(inpaint_tests
tests/catch.hpp
tests/gradient.cpp
tests/patch.cpp
tests/integral.cpp
tests/criminisi_inpainter.cpp
tests/template_match_candidates.cpp
tests/patch_match.cpp
)
target_link_libraries (inpaint_tests inpaint ${OpenCV_LIBRARIES})
# Benchmarks
include_directories("benchmarks")
add_executable(inpaint_benchmarks
benchmarks/catch.hpp
benchmarks/patch.cpp
)
target_link_libraries (inpaint_benchmarks inpaint ${OpenCV_LIBRARIES})
================================================
FILE: COPYING
================================================
/**
This file is part of Inpaint.
Copyright Christoph Heindl 2014
Inpaint is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Inpaint is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Inpaint. If not, see <http://www.gnu.org/licenses/>.
*/
================================================
FILE: README.md
================================================
# Inpaint
**Inpaint** is a C++ library providing implementations of image inpainting and image completion methods. Image inpainting is the process of recovering or restoring image regions in a way that is non-detectable for an observer who does not know the original image.
While inpainting refers to restoring rather small regions such as scratches and other video artefacts, image completion deals with removal / restoring of large image parts.
**Inpaint** focuses on the task of object removal and is therefore optimized to work with large areas of reconstruction. Below is a side-by-side view of two images. On the left the original image, on the right the modified image as produced by **Inpaint**, after the user selected the rope to be removed.
| Original | Inpainted |
| :-------------: |:-------------:|
|  |  |
## Building from source
To build **Inpaint** from source you need the following prerequisites
- [CMake](www.cmake.org) - for generating cross plattform build files
- [OpenCV](www.opencv.org) - for image processing related functions
Although **Inpaint** should build accross multiple platforms and architectures, tests are carried out on these systems
- Windows 7/8/10 MSVC10/MSVC14 x86/x64 OpenCV 2.x/3.x
If the build should fail for a specific platform, don't hestitate to create an issue. I'm also happy to accept any pull requests.
## Inpainting images
After building you might want to try out `inpaint_image_criminisi`
1. Launch `inpaint_image_criminisi <image>`.
1. Use the sliders on top of the UI to adjust patch and stencil size. Patch size refers to the size of texels that will be used during inpainting. It should be roughly the size of minimum texture feature size you intend to inpaint. Stencil size refers to radius of the interactive drawing tools explained in the following 2 steps.
1. While holding your left mouse button pressed, move your mouse to mark the target area to be inpainted.
1. While holding your right mouse button pressed, move your mouse to mark the source area from which samples can be copied to target area. If you skip this step, the entire image without source region is used as source area.
1. Press `e` to toggle between editing / inpaint mode.
1. Press `x` to quit.
## License
```
Copyright Christoph Heindl 2014-2017
Inpaint is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Inpaint is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Inpaint. If not, see <http://www.gnu.org/licenses/>.
```
================================================
FILE: benchmarks/catch.hpp
================================================
/*
* CATCH v1.0 build 53 (master branch)
* Generated: 2014-08-20 08:08:19.533804
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED
#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
// #included from: internal/catch_suppress_warnings.h
#define TWOBLUECUBES_CATCH_SUPPRESS_WARNINGS_H_INCLUDED
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvariadic-macros"
#pragma clang diagnostic ignored "-Wc99-extensions"
#pragma clang diagnostic ignored "-Wunused-variable"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#pragma clang diagnostic ignored "-Wc++98-compat"
#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
#elif defined __GNUC__
#pragma GCC diagnostic ignored "-Wvariadic-macros"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpadded"
#endif
#ifdef CATCH_CONFIG_MAIN
# define CATCH_CONFIG_RUNNER
#endif
#ifdef CATCH_CONFIG_RUNNER
# ifndef CLARA_CONFIG_MAIN
# define CLARA_CONFIG_MAIN_NOT_DEFINED
# define CLARA_CONFIG_MAIN
# endif
#endif
// #included from: internal/catch_notimplemented_exception.h
#define TWOBLUECUBES_CATCH_NOTIMPLEMENTED_EXCEPTION_H_INCLUDED
// #included from: catch_common.h
#define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
#define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ )
#define INTERNAL_CATCH_STRINGIFY2( expr ) #expr
#define INTERNAL_CATCH_STRINGIFY( expr ) INTERNAL_CATCH_STRINGIFY2( expr )
#include <sstream>
#include <stdexcept>
#include <algorithm>
// #included from: catch_compiler_capabilities.h
#define TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED
// Much of the following code is based on Boost (1.53)
#ifdef __clang__
# if __has_feature(cxx_nullptr)
# define CATCH_CONFIG_CPP11_NULLPTR
# endif
# if __has_feature(cxx_noexcept)
# define CATCH_CONFIG_CPP11_NOEXCEPT
# endif
#endif // __clang__
////////////////////////////////////////////////////////////////////////////////
// Borland
#ifdef __BORLANDC__
#if (__BORLANDC__ > 0x582 )
//#define CATCH_CONFIG_SFINAE // Not confirmed
#endif
#endif // __BORLANDC__
////////////////////////////////////////////////////////////////////////////////
// EDG
#ifdef __EDG_VERSION__
#if (__EDG_VERSION__ > 238 )
//#define CATCH_CONFIG_SFINAE // Not confirmed
#endif
#endif // __EDG_VERSION__
////////////////////////////////////////////////////////////////////////////////
// Digital Mars
#ifdef __DMC__
#if (__DMC__ > 0x840 )
//#define CATCH_CONFIG_SFINAE // Not confirmed
#endif
#endif // __DMC__
////////////////////////////////////////////////////////////////////////////////
// GCC
#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__) )
#define CATCH_CONFIG_CPP11_NULLPTR
#endif
#endif // __GNUC__
////////////////////////////////////////////////////////////////////////////////
// Visual C++
#ifdef _MSC_VER
#if (_MSC_VER >= 1310 ) // (VC++ 7.0+)
//#define CATCH_CONFIG_SFINAE // Not confirmed
#endif
#endif // _MSC_VER
// Use variadic macros if the compiler supports them
#if ( defined _MSC_VER && _MSC_VER > 1400 && !defined __EDGE__) || \
( defined __WAVE__ && __WAVE_HAS_VARIADICS ) || \
( defined __GNUC__ && __GNUC__ >= 3 ) || \
( !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L )
#ifndef CATCH_CONFIG_NO_VARIADIC_MACROS
#define CATCH_CONFIG_VARIADIC_MACROS
#endif
#endif
////////////////////////////////////////////////////////////////////////////////
// C++ language feature support
// detect language version:
#if (__cplusplus == 201103L)
# define CATCH_CPP11
# define CATCH_CPP11_OR_GREATER
#elif (__cplusplus >= 201103L)
# define CATCH_CPP11_OR_GREATER
#endif
// noexcept support:
#if defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_NOEXCEPT)
# define CATCH_NOEXCEPT noexcept
# define CATCH_NOEXCEPT_IS(x) noexcept(x)
#else
# define CATCH_NOEXCEPT throw()
# define CATCH_NOEXCEPT_IS(x)
#endif
namespace Catch {
class NonCopyable {
NonCopyable( NonCopyable const& );
void operator = ( NonCopyable const& );
protected:
NonCopyable() {}
virtual ~NonCopyable();
};
class SafeBool {
public:
typedef void (SafeBool::*type)() const;
static type makeSafe( bool value ) {
return value ? &SafeBool::trueValue : 0;
}
private:
void trueValue() const {}
};
template<typename ContainerT>
inline void deleteAll( ContainerT& container ) {
typename ContainerT::const_iterator it = container.begin();
typename ContainerT::const_iterator itEnd = container.end();
for(; it != itEnd; ++it )
delete *it;
}
template<typename AssociativeContainerT>
inline void deleteAllValues( AssociativeContainerT& container ) {
typename AssociativeContainerT::const_iterator it = container.begin();
typename AssociativeContainerT::const_iterator itEnd = container.end();
for(; it != itEnd; ++it )
delete it->second;
}
bool startsWith( std::string const& s, std::string const& prefix );
bool endsWith( std::string const& s, std::string const& suffix );
bool contains( std::string const& s, std::string const& infix );
void toLowerInPlace( std::string& s );
std::string toLower( std::string const& s );
std::string trim( std::string const& str );
struct pluralise {
pluralise( std::size_t count, std::string const& label );
friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser );
std::size_t m_count;
std::string m_label;
};
struct SourceLineInfo {
SourceLineInfo();
SourceLineInfo( char const* _file, std::size_t _line );
SourceLineInfo( SourceLineInfo const& other );
# ifdef CATCH_CPP11_OR_GREATER
SourceLineInfo( SourceLineInfo && ) = default;
SourceLineInfo& operator = ( SourceLineInfo const& ) = default;
SourceLineInfo& operator = ( SourceLineInfo && ) = default;
# endif
bool empty() const;
bool operator == ( SourceLineInfo const& other ) const;
std::string file;
std::size_t line;
};
std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );
// This is just here to avoid compiler warnings with macro constants and boolean literals
inline bool isTrue( bool value ){ return value; }
inline bool alwaysTrue() { return true; }
inline bool alwaysFalse() { return false; }
void throwLogicError( std::string const& message, SourceLineInfo const& locationInfo );
// Use this in variadic streaming macros to allow
// >> +StreamEndStop
// as well as
// >> stuff +StreamEndStop
struct StreamEndStop {
std::string operator+() {
return std::string();
}
};
template<typename T>
T const& operator + ( T const& value, StreamEndStop ) {
return value;
}
}
#define CATCH_INTERNAL_LINEINFO ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )
#define CATCH_INTERNAL_ERROR( msg ) ::Catch::throwLogicError( msg, CATCH_INTERNAL_LINEINFO );
#include <ostream>
namespace Catch {
class NotImplementedException : public std::exception
{
public:
NotImplementedException( SourceLineInfo const& lineInfo );
NotImplementedException( NotImplementedException const& ) {}
virtual ~NotImplementedException() CATCH_NOEXCEPT {}
virtual const char* what() const CATCH_NOEXCEPT;
private:
std::string m_what;
SourceLineInfo m_lineInfo;
};
} // end namespace Catch
///////////////////////////////////////////////////////////////////////////////
#define CATCH_NOT_IMPLEMENTED throw Catch::NotImplementedException( CATCH_INTERNAL_LINEINFO )
// #included from: internal/catch_context.h
#define TWOBLUECUBES_CATCH_CONTEXT_H_INCLUDED
// #included from: catch_interfaces_generators.h
#define TWOBLUECUBES_CATCH_INTERFACES_GENERATORS_H_INCLUDED
#include <string>
namespace Catch {
struct IGeneratorInfo {
virtual ~IGeneratorInfo();
virtual bool moveNext() = 0;
virtual std::size_t getCurrentIndex() const = 0;
};
struct IGeneratorsForTest {
virtual ~IGeneratorsForTest();
virtual IGeneratorInfo& getGeneratorInfo( std::string const& fileInfo, std::size_t size ) = 0;
virtual bool moveNext() = 0;
};
IGeneratorsForTest* createGeneratorsForTest();
} // end namespace Catch
// #included from: catch_ptr.hpp
#define TWOBLUECUBES_CATCH_PTR_HPP_INCLUDED
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#endif
namespace Catch {
// An intrusive reference counting smart pointer.
// T must implement addRef() and release() methods
// typically implementing the IShared interface
template<typename T>
class Ptr {
public:
Ptr() : m_p( NULL ){}
Ptr( T* p ) : m_p( p ){
if( m_p )
m_p->addRef();
}
Ptr( Ptr const& other ) : m_p( other.m_p ){
if( m_p )
m_p->addRef();
}
~Ptr(){
if( m_p )
m_p->release();
}
void reset() {
if( m_p )
m_p->release();
m_p = NULL;
}
Ptr& operator = ( T* p ){
Ptr temp( p );
swap( temp );
return *this;
}
Ptr& operator = ( Ptr const& other ){
Ptr temp( other );
swap( temp );
return *this;
}
void swap( Ptr& other ) { std::swap( m_p, other.m_p ); }
T* get() { return m_p; }
const T* get() const{ return m_p; }
T& operator*() const { return *m_p; }
T* operator->() const { return m_p; }
bool operator !() const { return m_p == NULL; }
operator SafeBool::type() const { return SafeBool::makeSafe( m_p != NULL ); }
private:
T* m_p;
};
struct IShared : NonCopyable {
virtual ~IShared();
virtual void addRef() const = 0;
virtual void release() const = 0;
};
template<typename T = IShared>
struct SharedImpl : T {
SharedImpl() : m_rc( 0 ){}
virtual void addRef() const {
++m_rc;
}
virtual void release() const {
if( --m_rc == 0 )
delete this;
}
mutable unsigned int m_rc;
};
} // end namespace Catch
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#include <memory>
#include <vector>
#include <stdlib.h>
namespace Catch {
class TestCase;
class Stream;
struct IResultCapture;
struct IRunner;
struct IGeneratorsForTest;
struct IConfig;
struct IContext
{
virtual ~IContext();
virtual IResultCapture* getResultCapture() = 0;
virtual IRunner* getRunner() = 0;
virtual size_t getGeneratorIndex( std::string const& fileInfo, size_t totalSize ) = 0;
virtual bool advanceGeneratorsForCurrentTest() = 0;
virtual Ptr<IConfig const> getConfig() const = 0;
};
struct IMutableContext : IContext
{
virtual ~IMutableContext();
virtual void setResultCapture( IResultCapture* resultCapture ) = 0;
virtual void setRunner( IRunner* runner ) = 0;
virtual void setConfig( Ptr<IConfig const> const& config ) = 0;
};
IContext& getCurrentContext();
IMutableContext& getCurrentMutableContext();
void cleanUpContext();
Stream createStream( std::string const& streamName );
}
// #included from: internal/catch_test_registry.hpp
#define TWOBLUECUBES_CATCH_TEST_REGISTRY_HPP_INCLUDED
// #included from: catch_interfaces_testcase.h
#define TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED
#include <vector>
namespace Catch {
class TestSpec;
struct ITestCase : IShared {
virtual void invoke () const = 0;
protected:
virtual ~ITestCase();
};
class TestCase;
struct IConfig;
struct ITestCaseRegistry {
virtual ~ITestCaseRegistry();
virtual std::vector<TestCase> const& getAllTests() const = 0;
virtual void getFilteredTests( TestSpec const& testSpec, IConfig const& config, std::vector<TestCase>& matchingTestCases ) const = 0;
};
}
namespace Catch {
template<typename C>
class MethodTestCase : public SharedImpl<ITestCase> {
public:
MethodTestCase( void (C::*method)() ) : m_method( method ) {}
virtual void invoke() const {
C obj;
(obj.*m_method)();
}
private:
virtual ~MethodTestCase() {}
void (C::*m_method)();
};
typedef void(*TestFunction)();
struct NameAndDesc {
NameAndDesc( const char* _name = "", const char* _description= "" )
: name( _name ), description( _description )
{}
const char* name;
const char* description;
};
struct AutoReg {
AutoReg( TestFunction function,
SourceLineInfo const& lineInfo,
NameAndDesc const& nameAndDesc );
template<typename C>
AutoReg( void (C::*method)(),
char const* className,
NameAndDesc const& nameAndDesc,
SourceLineInfo const& lineInfo ) {
registerTestCase( new MethodTestCase<C>( method ),
className,
nameAndDesc,
lineInfo );
}
void registerTestCase( ITestCase* testCase,
char const* className,
NameAndDesc const& nameAndDesc,
SourceLineInfo const& lineInfo );
~AutoReg();
private:
AutoReg( AutoReg const& );
void operator= ( AutoReg const& );
};
} // end namespace Catch
#ifdef CATCH_CONFIG_VARIADIC_MACROS
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TESTCASE( ... ) \
static void INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )(); \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), CATCH_INTERNAL_LINEINFO, Catch::NameAndDesc( __VA_ARGS__ ) ); }\
static void INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )()
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &QualifiedMethod, "&" #QualifiedMethod, Catch::NameAndDesc( __VA_ARGS__ ), CATCH_INTERNAL_LINEINFO ); }
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... )\
namespace{ \
struct INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) : ClassName{ \
void test(); \
}; \
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( &INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )::test, #ClassName, Catch::NameAndDesc( __VA_ARGS__ ), CATCH_INTERNAL_LINEINFO ); \
} \
void INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )::test()
#else
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TESTCASE( Name, Desc ) \
static void INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )(); \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), CATCH_INTERNAL_LINEINFO, Catch::NameAndDesc( Name, Desc ) ); }\
static void INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )()
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, Name, Desc ) \
namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &QualifiedMethod, "&" #QualifiedMethod, Catch::NameAndDesc( Name, Desc ), CATCH_INTERNAL_LINEINFO ); }
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, TestName, Desc )\
namespace{ \
struct INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) : ClassName{ \
void test(); \
}; \
Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( &INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )::test, #ClassName, Catch::NameAndDesc( TestName, Desc ), CATCH_INTERNAL_LINEINFO ); \
} \
void INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )::test()
#endif
// #included from: internal/catch_capture.hpp
#define TWOBLUECUBES_CATCH_CAPTURE_HPP_INCLUDED
// #included from: catch_result_builder.h
#define TWOBLUECUBES_CATCH_RESULT_BUILDER_H_INCLUDED
// #included from: catch_result_type.h
#define TWOBLUECUBES_CATCH_RESULT_TYPE_H_INCLUDED
namespace Catch {
// ResultWas::OfType enum
struct ResultWas { enum OfType {
Unknown = -1,
Ok = 0,
Info = 1,
Warning = 2,
FailureBit = 0x10,
ExpressionFailed = FailureBit | 1,
ExplicitFailure = FailureBit | 2,
Exception = 0x100 | FailureBit,
ThrewException = Exception | 1,
DidntThrowException = Exception | 2
}; };
inline bool isOk( ResultWas::OfType resultType ) {
return ( resultType & ResultWas::FailureBit ) == 0;
}
inline bool isJustInfo( int flags ) {
return flags == ResultWas::Info;
}
// ResultDisposition::Flags enum
struct ResultDisposition { enum Flags {
Normal = 0x00,
ContinueOnFailure = 0x01, // Failures fail test, but execution continues
FalseTest = 0x02, // Prefix expression with !
SuppressFail = 0x04 // Failures are reported but do not fail the test
}; };
inline ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) {
return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) );
}
inline bool shouldContinueOnFailure( int flags ) { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; }
inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; }
inline bool shouldSuppressFailure( int flags ) { return ( flags & ResultDisposition::SuppressFail ) != 0; }
} // end namespace Catch
// #included from: catch_assertionresult.h
#define TWOBLUECUBES_CATCH_ASSERTIONRESULT_H_INCLUDED
#include <string>
namespace Catch {
struct AssertionInfo
{
AssertionInfo() {}
AssertionInfo( std::string const& _macroName,
SourceLineInfo const& _lineInfo,
std::string const& _capturedExpression,
ResultDisposition::Flags _resultDisposition );
std::string macroName;
SourceLineInfo lineInfo;
std::string capturedExpression;
ResultDisposition::Flags resultDisposition;
};
struct AssertionResultData
{
AssertionResultData() : resultType( ResultWas::Unknown ) {}
std::string reconstructedExpression;
std::string message;
ResultWas::OfType resultType;
};
class AssertionResult {
public:
AssertionResult();
AssertionResult( AssertionInfo const& info, AssertionResultData const& data );
~AssertionResult();
# ifdef CATCH_CPP11_OR_GREATER
AssertionResult( AssertionResult const& ) = default;
AssertionResult( AssertionResult && ) = default;
AssertionResult& operator = ( AssertionResult const& ) = default;
AssertionResult& operator = ( AssertionResult && ) = default;
# endif
bool isOk() const;
bool succeeded() const;
ResultWas::OfType getResultType() const;
bool hasExpression() const;
bool hasMessage() const;
std::string getExpression() const;
std::string getExpressionInMacro() const;
bool hasExpandedExpression() const;
std::string getExpandedExpression() const;
std::string getMessage() const;
SourceLineInfo getSourceInfo() const;
std::string getTestMacroName() const;
protected:
AssertionInfo m_info;
AssertionResultData m_resultData;
};
} // end namespace Catch
namespace Catch {
struct TestFailureException{};
template<typename T> class ExpressionLhs;
struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison;
struct CopyableStream {
CopyableStream() {}
CopyableStream( CopyableStream const& other ) {
oss << other.oss.str();
}
CopyableStream& operator=( CopyableStream const& other ) {
oss.str("");
oss << other.oss.str();
return *this;
}
std::ostringstream oss;
};
class ResultBuilder {
public:
ResultBuilder( char const* macroName,
SourceLineInfo const& lineInfo,
char const* capturedExpression,
ResultDisposition::Flags resultDisposition );
template<typename T>
ExpressionLhs<T const&> operator->* ( T const& operand );
ExpressionLhs<bool> operator->* ( bool value );
template<typename T>
ResultBuilder& operator << ( T const& value ) {
m_stream.oss << value;
return *this;
}
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( RhsT const& );
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( RhsT const& );
ResultBuilder& setResultType( ResultWas::OfType result );
ResultBuilder& setResultType( bool result );
ResultBuilder& setLhs( std::string const& lhs );
ResultBuilder& setRhs( std::string const& rhs );
ResultBuilder& setOp( std::string const& op );
void endExpression();
std::string reconstructExpression() const;
AssertionResult build() const;
void useActiveException( ResultDisposition::Flags resultDisposition = ResultDisposition::Normal );
void captureResult( ResultWas::OfType resultType );
void captureExpression();
void react();
bool shouldDebugBreak() const;
bool allowThrows() const;
private:
AssertionInfo m_assertionInfo;
AssertionResultData m_data;
struct ExprComponents {
ExprComponents() : testFalse( false ) {}
bool testFalse;
std::string lhs, rhs, op;
} m_exprComponents;
CopyableStream m_stream;
bool m_shouldDebugBreak;
bool m_shouldThrow;
};
} // namespace Catch
// Include after due to circular dependency:
// #included from: catch_expression_lhs.hpp
#define TWOBLUECUBES_CATCH_EXPRESSION_LHS_HPP_INCLUDED
// #included from: catch_evaluate.hpp
#define TWOBLUECUBES_CATCH_EVALUATE_HPP_INCLUDED
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4389) // '==' : signed/unsigned mismatch
#endif
#include <cstddef>
namespace Catch {
namespace Internal {
enum Operator {
IsEqualTo,
IsNotEqualTo,
IsLessThan,
IsGreaterThan,
IsLessThanOrEqualTo,
IsGreaterThanOrEqualTo
};
template<Operator Op> struct OperatorTraits { static const char* getName(){ return "*error*"; } };
template<> struct OperatorTraits<IsEqualTo> { static const char* getName(){ return "=="; } };
template<> struct OperatorTraits<IsNotEqualTo> { static const char* getName(){ return "!="; } };
template<> struct OperatorTraits<IsLessThan> { static const char* getName(){ return "<"; } };
template<> struct OperatorTraits<IsGreaterThan> { static const char* getName(){ return ">"; } };
template<> struct OperatorTraits<IsLessThanOrEqualTo> { static const char* getName(){ return "<="; } };
template<> struct OperatorTraits<IsGreaterThanOrEqualTo>{ static const char* getName(){ return ">="; } };
template<typename T>
inline T& opCast(T const& t) { return const_cast<T&>(t); }
// nullptr_t support based on pull request #154 from Konstantin Baumann
#ifdef CATCH_CONFIG_CPP11_NULLPTR
inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; }
#endif // CATCH_CONFIG_CPP11_NULLPTR
// So the compare overloads can be operator agnostic we convey the operator as a template
// enum, which is used to specialise an Evaluator for doing the comparison.
template<typename T1, typename T2, Operator Op>
class Evaluator{};
template<typename T1, typename T2>
struct Evaluator<T1, T2, IsEqualTo> {
static bool evaluate( T1 const& lhs, T2 const& rhs) {
return opCast( lhs ) == opCast( rhs );
}
};
template<typename T1, typename T2>
struct Evaluator<T1, T2, IsNotEqualTo> {
static bool evaluate( T1 const& lhs, T2 const& rhs ) {
return opCast( lhs ) != opCast( rhs );
}
};
template<typename T1, typename T2>
struct Evaluator<T1, T2, IsLessThan> {
static bool evaluate( T1 const& lhs, T2 const& rhs ) {
return opCast( lhs ) < opCast( rhs );
}
};
template<typename T1, typename T2>
struct Evaluator<T1, T2, IsGreaterThan> {
static bool evaluate( T1 const& lhs, T2 const& rhs ) {
return opCast( lhs ) > opCast( rhs );
}
};
template<typename T1, typename T2>
struct Evaluator<T1, T2, IsGreaterThanOrEqualTo> {
static bool evaluate( T1 const& lhs, T2 const& rhs ) {
return opCast( lhs ) >= opCast( rhs );
}
};
template<typename T1, typename T2>
struct Evaluator<T1, T2, IsLessThanOrEqualTo> {
static bool evaluate( T1 const& lhs, T2 const& rhs ) {
return opCast( lhs ) <= opCast( rhs );
}
};
template<Operator Op, typename T1, typename T2>
bool applyEvaluator( T1 const& lhs, T2 const& rhs ) {
return Evaluator<T1, T2, Op>::evaluate( lhs, rhs );
}
// This level of indirection allows us to specialise for integer types
// to avoid signed/ unsigned warnings
// "base" overload
template<Operator Op, typename T1, typename T2>
bool compare( T1 const& lhs, T2 const& rhs ) {
return Evaluator<T1, T2, Op>::evaluate( lhs, rhs );
}
// unsigned X to int
template<Operator Op> bool compare( unsigned int lhs, int rhs ) {
return applyEvaluator<Op>( lhs, static_cast<unsigned int>( rhs ) );
}
template<Operator Op> bool compare( unsigned long lhs, int rhs ) {
return applyEvaluator<Op>( lhs, static_cast<unsigned int>( rhs ) );
}
template<Operator Op> bool compare( unsigned char lhs, int rhs ) {
return applyEvaluator<Op>( lhs, static_cast<unsigned int>( rhs ) );
}
// unsigned X to long
template<Operator Op> bool compare( unsigned int lhs, long rhs ) {
return applyEvaluator<Op>( lhs, static_cast<unsigned long>( rhs ) );
}
template<Operator Op> bool compare( unsigned long lhs, long rhs ) {
return applyEvaluator<Op>( lhs, static_cast<unsigned long>( rhs ) );
}
template<Operator Op> bool compare( unsigned char lhs, long rhs ) {
return applyEvaluator<Op>( lhs, static_cast<unsigned long>( rhs ) );
}
// int to unsigned X
template<Operator Op> bool compare( int lhs, unsigned int rhs ) {
return applyEvaluator<Op>( static_cast<unsigned int>( lhs ), rhs );
}
template<Operator Op> bool compare( int lhs, unsigned long rhs ) {
return applyEvaluator<Op>( static_cast<unsigned int>( lhs ), rhs );
}
template<Operator Op> bool compare( int lhs, unsigned char rhs ) {
return applyEvaluator<Op>( static_cast<unsigned int>( lhs ), rhs );
}
// long to unsigned X
template<Operator Op> bool compare( long lhs, unsigned int rhs ) {
return applyEvaluator<Op>( static_cast<unsigned long>( lhs ), rhs );
}
template<Operator Op> bool compare( long lhs, unsigned long rhs ) {
return applyEvaluator<Op>( static_cast<unsigned long>( lhs ), rhs );
}
template<Operator Op> bool compare( long lhs, unsigned char rhs ) {
return applyEvaluator<Op>( static_cast<unsigned long>( lhs ), rhs );
}
// pointer to long (when comparing against NULL)
template<Operator Op, typename T> bool compare( long lhs, T* rhs ) {
return Evaluator<T*, T*, Op>::evaluate( reinterpret_cast<T*>( lhs ), rhs );
}
template<Operator Op, typename T> bool compare( T* lhs, long rhs ) {
return Evaluator<T*, T*, Op>::evaluate( lhs, reinterpret_cast<T*>( rhs ) );
}
// pointer to int (when comparing against NULL)
template<Operator Op, typename T> bool compare( int lhs, T* rhs ) {
return Evaluator<T*, T*, Op>::evaluate( reinterpret_cast<T*>( lhs ), rhs );
}
template<Operator Op, typename T> bool compare( T* lhs, int rhs ) {
return Evaluator<T*, T*, Op>::evaluate( lhs, reinterpret_cast<T*>( rhs ) );
}
#ifdef CATCH_CONFIG_CPP11_NULLPTR
// pointer to nullptr_t (when comparing against nullptr)
template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
return Evaluator<T*, T*, Op>::evaluate( NULL, rhs );
}
template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) {
return Evaluator<T*, T*, Op>::evaluate( lhs, NULL );
}
#endif // CATCH_CONFIG_CPP11_NULLPTR
} // end of namespace Internal
} // end of namespace Catch
#ifdef _MSC_VER
#pragma warning(pop)
#endif
// #included from: catch_tostring.h
#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 <iomanip>
#include <limits>
#include <vector>
#include <cstddef>
#ifdef __OBJC__
// #included from: catch_objc_arc.hpp
#define TWOBLUECUBES_CATCH_OBJC_ARC_HPP_INCLUDED
#import <Foundation/Foundation.h>
#ifdef __has_feature
#define CATCH_ARC_ENABLED __has_feature(objc_arc)
#else
#define CATCH_ARC_ENABLED 0
#endif
void arcSafeRelease( NSObject* obj );
id performOptionalSelector( id obj, SEL sel );
#if !CATCH_ARC_ENABLED
inline void arcSafeRelease( NSObject* obj ) {
[obj release];
}
inline id performOptionalSelector( id obj, SEL sel ) {
if( [obj respondsToSelector: sel] )
return [obj performSelector: sel];
return nil;
}
#define CATCH_UNSAFE_UNRETAINED
#define CATCH_ARC_STRONG
#else
inline void arcSafeRelease( NSObject* ){}
inline id performOptionalSelector( id obj, SEL sel ) {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
#endif
if( [obj respondsToSelector: sel] )
return [obj performSelector: sel];
#ifdef __clang__
#pragma clang diagnostic pop
#endif
return nil;
}
#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained
#define CATCH_ARC_STRONG __strong
#endif
#endif
namespace Catch {
namespace Detail {
// 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 {
template<typename T> BorgType( T const& );
};
TrueType& testStreamable( std::ostream& );
FalseType testStreamable( FalseType );
FalseType operator<<( std::ostream const&, BorgType const& );
template<typename T>
struct IsStreamInsertable {
static std::ostream &s;
static T const&t;
enum { value = sizeof( testStreamable(s << t) ) == sizeof( TrueType ) };
};
#endif
template<bool C>
struct StringMakerBase {
template<typename T>
static std::string convert( T const& ) { return "{?}"; }
};
template<>
struct StringMakerBase<true> {
template<typename T>
static std::string convert( T const& _value ) {
std::ostringstream oss;
oss << _value;
return oss.str();
}
};
std::string rawMemoryToString( const void *object, std::size_t size );
template<typename T>
inline std::string rawMemoryToString( const T& object ) {
return rawMemoryToString( &object, sizeof(object) );
}
} // end namespace Detail
template<typename T>
std::string toString( T const& value );
template<typename T>
struct StringMaker :
Detail::StringMakerBase<Detail::IsStreamInsertable<T>::value> {};
template<typename T>
struct StringMaker<T*> {
template<typename U>
static std::string convert( U* p ) {
if( !p )
return INTERNAL_CATCH_STRINGIFY( NULL );
else
return Detail::rawMemoryToString( p );
}
};
template<typename R, typename C>
struct StringMaker<R C::*> {
static std::string convert( R C::* p ) {
if( !p )
return INTERNAL_CATCH_STRINGIFY( NULL );
else
return Detail::rawMemoryToString( p );
}
};
namespace Detail {
template<typename InputIterator>
std::string rangeToString( InputIterator first, InputIterator last );
}
template<typename T, typename Allocator>
struct StringMaker<std::vector<T, Allocator> > {
static std::string convert( std::vector<T,Allocator> const& v ) {
return Detail::rangeToString( v.begin(), v.end() );
}
};
namespace Detail {
template<typename T>
std::string makeString( T const& value ) {
return StringMaker<T>::convert( value );
}
} // end namespace Detail
/// \brief converts any type to a string
///
/// The default template forwards on to ostringstream - except when an
/// ostringstream overload does not exist - in which case it attempts to detect
/// that and writes {?}.
/// Overload (not specialise) this template for custom typs that you don't want
/// to provide an ostream overload for.
template<typename T>
std::string toString( T const& value ) {
return StringMaker<T>::convert( value );
}
// Built in overloads
std::string toString( std::string const& value );
std::string toString( std::wstring const& value );
std::string toString( const char* const value );
std::string toString( char* const value );
std::string toString( const wchar_t* const value );
std::string toString( wchar_t* const value );
std::string toString( int value );
std::string toString( unsigned long value );
std::string toString( unsigned int value );
std::string toString( const double value );
std::string toString( const float value );
std::string toString( bool value );
std::string toString( char value );
std::string toString( signed char value );
std::string toString( unsigned char value );
#ifdef CATCH_CONFIG_CPP11_NULLPTR
std::string toString( std::nullptr_t );
#endif
#ifdef __OBJC__
std::string toString( NSString const * const& nsstring );
std::string toString( NSString * CATCH_ARC_STRONG const& nsstring );
std::string toString( NSObject* const& nsObject );
#endif
namespace Detail {
template<typename InputIterator>
std::string rangeToString( InputIterator first, InputIterator last ) {
std::ostringstream oss;
oss << "{ ";
if( first != last ) {
oss << toString( *first );
for( ++first ; first != last ; ++first ) {
oss << ", " << toString( *first );
}
}
oss << " }";
return oss.str();
}
}
} // end namespace Catch
namespace Catch {
// Wraps the LHS of an expression and captures the operator and RHS (if any) -
// wrapping them all in a ResultBuilder object
template<typename T>
class ExpressionLhs {
ExpressionLhs& operator = ( ExpressionLhs const& );
# ifdef CATCH_CPP11_OR_GREATER
ExpressionLhs& operator = ( ExpressionLhs && ) = delete;
# endif
public:
ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {}
# ifdef CATCH_CPP11_OR_GREATER
ExpressionLhs( ExpressionLhs const& ) = default;
ExpressionLhs( ExpressionLhs && ) = default;
# endif
template<typename RhsT>
ResultBuilder& operator == ( RhsT const& rhs ) {
return captureExpression<Internal::IsEqualTo>( rhs );
}
template<typename RhsT>
ResultBuilder& operator != ( RhsT const& rhs ) {
return captureExpression<Internal::IsNotEqualTo>( rhs );
}
template<typename RhsT>
ResultBuilder& operator < ( RhsT const& rhs ) {
return captureExpression<Internal::IsLessThan>( rhs );
}
template<typename RhsT>
ResultBuilder& operator > ( RhsT const& rhs ) {
return captureExpression<Internal::IsGreaterThan>( rhs );
}
template<typename RhsT>
ResultBuilder& operator <= ( RhsT const& rhs ) {
return captureExpression<Internal::IsLessThanOrEqualTo>( rhs );
}
template<typename RhsT>
ResultBuilder& operator >= ( RhsT const& rhs ) {
return captureExpression<Internal::IsGreaterThanOrEqualTo>( rhs );
}
ResultBuilder& operator == ( bool rhs ) {
return captureExpression<Internal::IsEqualTo>( rhs );
}
ResultBuilder& operator != ( bool rhs ) {
return captureExpression<Internal::IsNotEqualTo>( rhs );
}
void endExpression() {
bool value = m_lhs ? true : false;
m_rb
.setLhs( Catch::toString( value ) )
.setResultType( value )
.endExpression();
}
// Only simple binary expressions are allowed on the LHS.
// If more complex compositions are required then place the sub expression in parentheses
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator + ( RhsT const& );
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator - ( RhsT const& );
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator / ( RhsT const& );
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator * ( RhsT const& );
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( RhsT const& );
template<typename RhsT> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( RhsT const& );
private:
template<Internal::Operator Op, typename RhsT>
ResultBuilder& captureExpression( RhsT const& rhs ) {
return m_rb
.setResultType( Internal::compare<Op>( m_lhs, rhs ) )
.setLhs( Catch::toString( m_lhs ) )
.setRhs( Catch::toString( rhs ) )
.setOp( Internal::OperatorTraits<Op>::getName() );
}
private:
ResultBuilder& m_rb;
T m_lhs;
};
} // end namespace Catch
namespace Catch {
template<typename T>
inline ExpressionLhs<T const&> ResultBuilder::operator->* ( T const& operand ) {
return ExpressionLhs<T const&>( *this, operand );
}
inline ExpressionLhs<bool> ResultBuilder::operator->* ( bool value ) {
return ExpressionLhs<bool>( *this, value );
}
} // namespace Catch
// #included from: catch_message.h
#define TWOBLUECUBES_CATCH_MESSAGE_H_INCLUDED
#include <string>
namespace Catch {
struct MessageInfo {
MessageInfo( std::string const& _macroName,
SourceLineInfo const& _lineInfo,
ResultWas::OfType _type );
std::string macroName;
SourceLineInfo lineInfo;
ResultWas::OfType type;
std::string message;
unsigned int sequence;
bool operator == ( MessageInfo const& other ) const {
return sequence == other.sequence;
}
bool operator < ( MessageInfo const& other ) const {
return sequence < other.sequence;
}
private:
static unsigned int globalCount;
};
struct MessageBuilder {
MessageBuilder( std::string const& macroName,
SourceLineInfo const& lineInfo,
ResultWas::OfType type )
: m_info( macroName, lineInfo, type )
{}
template<typename T>
MessageBuilder& operator << ( T const& value ) {
m_stream << value;
return *this;
}
MessageInfo m_info;
std::ostringstream m_stream;
};
class ScopedMessage {
public:
ScopedMessage( MessageBuilder const& builder );
ScopedMessage( ScopedMessage const& other );
~ScopedMessage();
MessageInfo m_info;
};
} // end namespace Catch
// #included from: catch_interfaces_capture.h
#define TWOBLUECUBES_CATCH_INTERFACES_CAPTURE_H_INCLUDED
#include <string>
namespace Catch {
class TestCase;
class AssertionResult;
struct AssertionInfo;
struct SectionInfo;
struct MessageInfo;
class ScopedMessageBuilder;
struct Counts;
struct IResultCapture {
virtual ~IResultCapture();
virtual void assertionEnded( AssertionResult const& result ) = 0;
virtual bool sectionStarted( SectionInfo const& sectionInfo,
Counts& assertions ) = 0;
virtual void sectionEnded( SectionInfo const& name, Counts const& assertions, double _durationInSeconds ) = 0;
virtual void pushScopedMessage( MessageInfo const& message ) = 0;
virtual void popScopedMessage( MessageInfo const& message ) = 0;
virtual std::string getCurrentTestName() const = 0;
virtual const AssertionResult* getLastResult() const = 0;
};
IResultCapture& getResultCapture();
}
// #included from: catch_debugger.h
#define TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED
// #included from: catch_platform.h
#define TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
#define CATCH_PLATFORM_MAC
#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
#define CATCH_PLATFORM_IPHONE
#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER)
#define CATCH_PLATFORM_WINDOWS
#endif
#include <string>
namespace Catch{
bool isDebuggerActive();
void writeToDebugConsole( std::string const& text );
}
#ifdef CATCH_PLATFORM_MAC
// The following code snippet based on:
// http://cocoawithlove.com/2008/03/break-into-debugger.html
#ifdef DEBUG
#if defined(__ppc64__) || defined(__ppc__)
#define CATCH_BREAK_INTO_DEBUGGER() \
if( Catch::isDebuggerActive() ) { \
__asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \
: : : "memory","r0","r3","r4" ); \
}
#else
#define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) {__asm__("int $3\n" : : );}
#endif
#endif
#elif defined(_MSC_VER)
#define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { __debugbreak(); }
#elif defined(__MINGW32__)
extern "C" __declspec(dllimport) void __stdcall DebugBreak();
#define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { DebugBreak(); }
#endif
#ifndef CATCH_BREAK_INTO_DEBUGGER
#define CATCH_BREAK_INTO_DEBUGGER() Catch::alwaysTrue();
#endif
// #included from: catch_interfaces_runner.h
#define TWOBLUECUBES_CATCH_INTERFACES_RUNNER_H_INCLUDED
namespace Catch {
class TestCase;
struct IRunner {
virtual ~IRunner();
virtual bool aborting() const = 0;
};
}
///////////////////////////////////////////////////////////////////////////////
// In the event of a failure works out if the debugger needs to be invoked
// and/or an exception thrown and takes appropriate action.
// This needs to be done as a macro so the debugger will stop in the user
// source code rather than in Catch library code
#define INTERNAL_CATCH_REACT( resultBuilder ) \
if( resultBuilder.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
resultBuilder.react();
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
try { \
( __catchResult->*expr ).endExpression(); \
} \
catch( ... ) { \
__catchResult.useActiveException( Catch::ResultDisposition::Normal ); \
} \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::isTrue( false && (expr) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_IF( expr, resultDisposition, macroName ) \
INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ); \
if( Catch::getResultCapture().getLastResult()->succeeded() )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_ELSE( expr, resultDisposition, macroName ) \
INTERNAL_CATCH_TEST( expr, resultDisposition, macroName ); \
if( !Catch::getResultCapture().getLastResult()->succeeded() )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_NO_THROW( expr, resultDisposition, macroName ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
try { \
expr; \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
} \
catch( ... ) { \
__catchResult.useActiveException( resultDisposition ); \
} \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::alwaysFalse() )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_THROWS( expr, resultDisposition, macroName ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
if( __catchResult.allowThrows() ) \
try { \
expr; \
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
} \
catch( ... ) { \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
} \
else \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::alwaysFalse() )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_THROWS_AS( expr, exceptionType, resultDisposition, macroName ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
if( __catchResult.allowThrows() ) \
try { \
expr; \
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
} \
catch( exceptionType ) { \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
} \
catch( ... ) { \
__catchResult.useActiveException( resultDisposition ); \
} \
else \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::alwaysFalse() )
///////////////////////////////////////////////////////////////////////////////
#ifdef CATCH_CONFIG_VARIADIC_MACROS
#define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, ... ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \
__catchResult << __VA_ARGS__ + ::Catch::StreamEndStop(); \
__catchResult.captureResult( messageType ); \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::alwaysFalse() )
#else
#define INTERNAL_CATCH_MSG( messageType, resultDisposition, macroName, log ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \
__catchResult << log + ::Catch::StreamEndStop(); \
__catchResult.captureResult( messageType ); \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::alwaysFalse() )
#endif
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_INFO( log, macroName ) \
Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage ) = Catch::MessageBuilder( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log;
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CHECK_THAT( arg, matcher, resultDisposition, macroName ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #arg " " #matcher, resultDisposition ); \
try { \
std::string matcherAsString = ::Catch::Matchers::matcher.toString(); \
__catchResult \
.setLhs( Catch::toString( arg ) ) \
.setRhs( matcherAsString == "{?}" ? #matcher : matcherAsString ) \
.setOp( "matches" ) \
.setResultType( ::Catch::Matchers::matcher.match( arg ) ); \
__catchResult.captureExpression(); \
} catch( ... ) { \
__catchResult.useActiveException( resultDisposition | Catch::ResultDisposition::ContinueOnFailure ); \
} \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::alwaysFalse() )
// #included from: internal/catch_section.h
#define TWOBLUECUBES_CATCH_SECTION_H_INCLUDED
// #included from: catch_section_info.h
#define TWOBLUECUBES_CATCH_SECTION_INFO_H_INCLUDED
namespace Catch {
struct SectionInfo {
SectionInfo
( SourceLineInfo const& _lineInfo,
std::string const& _name,
std::string const& _description = std::string() );
std::string name;
std::string description;
SourceLineInfo lineInfo;
};
} // end namespace Catch
// #included from: catch_totals.hpp
#define TWOBLUECUBES_CATCH_TOTALS_HPP_INCLUDED
#include <cstddef>
namespace Catch {
struct Counts {
Counts() : passed( 0 ), failed( 0 ), failedButOk( 0 ) {}
Counts operator - ( Counts const& other ) const {
Counts diff;
diff.passed = passed - other.passed;
diff.failed = failed - other.failed;
diff.failedButOk = failedButOk - other.failedButOk;
return diff;
}
Counts& operator += ( Counts const& other ) {
passed += other.passed;
failed += other.failed;
failedButOk += other.failedButOk;
return *this;
}
std::size_t total() const {
return passed + failed + failedButOk;
}
bool allPassed() const {
return failed == 0 && failedButOk == 0;
}
std::size_t passed;
std::size_t failed;
std::size_t failedButOk;
};
struct Totals {
Totals operator - ( Totals const& other ) const {
Totals diff;
diff.assertions = assertions - other.assertions;
diff.testCases = testCases - other.testCases;
return diff;
}
Totals delta( Totals const& prevTotals ) const {
Totals diff = *this - prevTotals;
if( diff.assertions.failed > 0 )
++diff.testCases.failed;
else if( diff.assertions.failedButOk > 0 )
++diff.testCases.failedButOk;
else
++diff.testCases.passed;
return diff;
}
Totals& operator += ( Totals const& other ) {
assertions += other.assertions;
testCases += other.testCases;
return *this;
}
Counts assertions;
Counts testCases;
};
}
// #included from: catch_timer.h
#define TWOBLUECUBES_CATCH_TIMER_H_INCLUDED
#ifdef CATCH_PLATFORM_WINDOWS
typedef unsigned long long uint64_t;
#else
#include <stdint.h>
#endif
namespace Catch {
class Timer {
public:
Timer() : m_ticks( 0 ) {}
void start();
unsigned int getElapsedNanoseconds() const;
unsigned int getElapsedMilliseconds() const;
double getElapsedSeconds() const;
private:
uint64_t m_ticks;
};
} // namespace Catch
#include <string>
namespace Catch {
class Section {
public:
Section( SectionInfo const& info );
~Section();
// This indicates whether the section should be executed or not
operator bool() const;
private:
#ifdef CATCH_CPP11_OR_GREATER
Section( Section const& ) = delete;
Section( Section && ) = delete;
Section& operator = ( Section const& ) = delete;
Section& operator = ( Section && ) = delete;
#else
Section( Section const& info );
Section& operator = ( Section const& );
#endif
SectionInfo m_info;
std::string m_name;
Counts m_assertions;
bool m_sectionIncluded;
Timer m_timer;
};
} // end namespace Catch
#ifdef CATCH_CONFIG_VARIADIC_MACROS
#define INTERNAL_CATCH_SECTION( ... ) \
if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) )
#else
#define INTERNAL_CATCH_SECTION( name, desc ) \
if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, name, desc ) )
#endif
// #included from: internal/catch_generators.hpp
#define TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED
#include <iterator>
#include <vector>
#include <string>
#include <stdlib.h>
namespace Catch {
template<typename T>
struct IGenerator {
virtual ~IGenerator() {}
virtual T getValue( std::size_t index ) const = 0;
virtual std::size_t size () const = 0;
};
template<typename T>
class BetweenGenerator : public IGenerator<T> {
public:
BetweenGenerator( T from, T to ) : m_from( from ), m_to( to ){}
virtual T getValue( std::size_t index ) const {
return m_from+static_cast<int>( index );
}
virtual std::size_t size() const {
return static_cast<std::size_t>( 1+m_to-m_from );
}
private:
T m_from;
T m_to;
};
template<typename T>
class ValuesGenerator : public IGenerator<T> {
public:
ValuesGenerator(){}
void add( T value ) {
m_values.push_back( value );
}
virtual T getValue( std::size_t index ) const {
return m_values[index];
}
virtual std::size_t size() const {
return m_values.size();
}
private:
std::vector<T> m_values;
};
template<typename T>
class CompositeGenerator {
public:
CompositeGenerator() : m_totalSize( 0 ) {}
// *** Move semantics, similar to auto_ptr ***
CompositeGenerator( CompositeGenerator& other )
: m_fileInfo( other.m_fileInfo ),
m_totalSize( 0 )
{
move( other );
}
CompositeGenerator& setFileInfo( const char* fileInfo ) {
m_fileInfo = fileInfo;
return *this;
}
~CompositeGenerator() {
deleteAll( m_composed );
}
operator T () const {
size_t overallIndex = getCurrentContext().getGeneratorIndex( m_fileInfo, m_totalSize );
typename std::vector<const IGenerator<T>*>::const_iterator it = m_composed.begin();
typename std::vector<const IGenerator<T>*>::const_iterator itEnd = m_composed.end();
for( size_t index = 0; it != itEnd; ++it )
{
const IGenerator<T>* generator = *it;
if( overallIndex >= index && overallIndex < index + generator->size() )
{
return generator->getValue( overallIndex-index );
}
index += generator->size();
}
CATCH_INTERNAL_ERROR( "Indexed past end of generated range" );
return T(); // Suppress spurious "not all control paths return a value" warning in Visual Studio - if you know how to fix this please do so
}
void add( const IGenerator<T>* generator ) {
m_totalSize += generator->size();
m_composed.push_back( generator );
}
CompositeGenerator& then( CompositeGenerator& other ) {
move( other );
return *this;
}
CompositeGenerator& then( T value ) {
ValuesGenerator<T>* valuesGen = new ValuesGenerator<T>();
valuesGen->add( value );
add( valuesGen );
return *this;
}
private:
void move( CompositeGenerator& other ) {
std::copy( other.m_composed.begin(), other.m_composed.end(), std::back_inserter( m_composed ) );
m_totalSize += other.m_totalSize;
other.m_composed.clear();
}
std::vector<const IGenerator<T>*> m_composed;
std::string m_fileInfo;
size_t m_totalSize;
};
namespace Generators
{
template<typename T>
CompositeGenerator<T> between( T from, T to ) {
CompositeGenerator<T> generators;
generators.add( new BetweenGenerator<T>( from, to ) );
return generators;
}
template<typename T>
CompositeGenerator<T> values( T val1, T val2 ) {
CompositeGenerator<T> generators;
ValuesGenerator<T>* valuesGen = new ValuesGenerator<T>();
valuesGen->add( val1 );
valuesGen->add( val2 );
generators.add( valuesGen );
return generators;
}
template<typename T>
CompositeGenerator<T> values( T val1, T val2, T val3 ){
CompositeGenerator<T> generators;
ValuesGenerator<T>* valuesGen = new ValuesGenerator<T>();
valuesGen->add( val1 );
valuesGen->add( val2 );
valuesGen->add( val3 );
generators.add( valuesGen );
return generators;
}
template<typename T>
CompositeGenerator<T> values( T val1, T val2, T val3, T val4 ) {
CompositeGenerator<T> generators;
ValuesGenerator<T>* valuesGen = new ValuesGenerator<T>();
valuesGen->add( val1 );
valuesGen->add( val2 );
valuesGen->add( val3 );
valuesGen->add( val4 );
generators.add( valuesGen );
return generators;
}
} // end namespace Generators
using namespace Generators;
} // end namespace Catch
#define INTERNAL_CATCH_LINESTR2( line ) #line
#define INTERNAL_CATCH_LINESTR( line ) INTERNAL_CATCH_LINESTR2( line )
#define INTERNAL_CATCH_GENERATE( expr ) expr.setFileInfo( __FILE__ "(" INTERNAL_CATCH_LINESTR( __LINE__ ) ")" )
// #included from: internal/catch_interfaces_exception.h
#define TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED
#include <string>
// #included from: catch_interfaces_registry_hub.h
#define TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
#include <string>
namespace Catch {
class TestCase;
struct ITestCaseRegistry;
struct IExceptionTranslatorRegistry;
struct IExceptionTranslator;
struct IReporterRegistry;
struct IReporterFactory;
struct IRegistryHub {
virtual ~IRegistryHub();
virtual IReporterRegistry const& getReporterRegistry() const = 0;
virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0;
virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() = 0;
};
struct IMutableRegistryHub {
virtual ~IMutableRegistryHub();
virtual void registerReporter( std::string const& name, IReporterFactory* factory ) = 0;
virtual void registerTest( TestCase const& testInfo ) = 0;
virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;
};
IRegistryHub& getRegistryHub();
IMutableRegistryHub& getMutableRegistryHub();
void cleanUp();
std::string translateActiveException();
}
namespace Catch {
typedef std::string(*exceptionTranslateFunction)();
struct IExceptionTranslator {
virtual ~IExceptionTranslator();
virtual std::string translate() const = 0;
};
struct IExceptionTranslatorRegistry {
virtual ~IExceptionTranslatorRegistry();
virtual std::string translateActiveException() const = 0;
};
class ExceptionTranslatorRegistrar {
template<typename T>
class ExceptionTranslator : public IExceptionTranslator {
public:
ExceptionTranslator( std::string(*translateFunction)( T& ) )
: m_translateFunction( translateFunction )
{}
virtual std::string translate() const {
try {
throw;
}
catch( T& ex ) {
return m_translateFunction( ex );
}
}
protected:
std::string(*m_translateFunction)( T& );
};
public:
template<typename T>
ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) {
getMutableRegistryHub().registerTranslator
( new ExceptionTranslator<T>( translateFunction ) );
}
};
}
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) \
static std::string INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator )( signature ); \
namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ) ); }\
static std::string INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator )( signature )
// #included from: internal/catch_approx.hpp
#define TWOBLUECUBES_CATCH_APPROX_HPP_INCLUDED
#include <cmath>
#include <limits>
namespace Catch {
namespace Detail {
class Approx {
public:
explicit Approx ( double value )
: m_epsilon( std::numeric_limits<float>::epsilon()*100 ),
m_scale( 1.0 ),
m_value( value )
{}
Approx( Approx const& other )
: m_epsilon( other.m_epsilon ),
m_scale( other.m_scale ),
m_value( other.m_value )
{}
static Approx custom() {
return Approx( 0 );
}
Approx operator()( double value ) {
Approx approx( value );
approx.epsilon( m_epsilon );
approx.scale( m_scale );
return approx;
}
friend bool operator == ( double lhs, Approx const& rhs ) {
// Thanks to Richard Harris for his help refining this formula
return fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) );
}
friend bool operator == ( Approx const& lhs, double rhs ) {
return operator==( rhs, lhs );
}
friend bool operator != ( double lhs, Approx const& rhs ) {
return !operator==( lhs, rhs );
}
friend bool operator != ( Approx const& lhs, double rhs ) {
return !operator==( rhs, lhs );
}
Approx& epsilon( double newEpsilon ) {
m_epsilon = newEpsilon;
return *this;
}
Approx& scale( double newScale ) {
m_scale = newScale;
return *this;
}
std::string toString() const {
std::ostringstream oss;
oss << "Approx( " << Catch::toString( m_value ) << " )";
return oss.str();
}
private:
double m_epsilon;
double m_scale;
double m_value;
};
}
template<>
inline std::string toString<Detail::Approx>( Detail::Approx const& value ) {
return value.toString();
}
} // end namespace Catch
// #included from: internal/catch_matchers.hpp
#define TWOBLUECUBES_CATCH_MATCHERS_HPP_INCLUDED
namespace Catch {
namespace Matchers {
namespace Impl {
template<typename ExpressionT>
struct Matcher : SharedImpl<IShared>
{
typedef ExpressionT ExpressionType;
virtual ~Matcher() {}
virtual Ptr<Matcher> clone() const = 0;
virtual bool match( ExpressionT const& expr ) const = 0;
virtual std::string toString() const = 0;
};
template<typename DerivedT, typename ExpressionT>
struct MatcherImpl : Matcher<ExpressionT> {
virtual Ptr<Matcher<ExpressionT> > clone() const {
return Ptr<Matcher<ExpressionT> >( new DerivedT( static_cast<DerivedT const&>( *this ) ) );
}
};
namespace Generic {
template<typename ExpressionT>
class AllOf : public MatcherImpl<AllOf<ExpressionT>, ExpressionT> {
public:
AllOf() {}
AllOf( AllOf const& other ) : m_matchers( other.m_matchers ) {}
AllOf& add( Matcher<ExpressionT> const& matcher ) {
m_matchers.push_back( matcher.clone() );
return *this;
}
virtual bool match( ExpressionT const& expr ) const
{
for( std::size_t i = 0; i < m_matchers.size(); ++i )
if( !m_matchers[i]->match( expr ) )
return false;
return true;
}
virtual std::string toString() const {
std::ostringstream oss;
oss << "( ";
for( std::size_t i = 0; i < m_matchers.size(); ++i ) {
if( i != 0 )
oss << " and ";
oss << m_matchers[i]->toString();
}
oss << " )";
return oss.str();
}
private:
std::vector<Ptr<Matcher<ExpressionT> > > m_matchers;
};
template<typename ExpressionT>
class AnyOf : public MatcherImpl<AnyOf<ExpressionT>, ExpressionT> {
public:
AnyOf() {}
AnyOf( AnyOf const& other ) : m_matchers( other.m_matchers ) {}
AnyOf& add( Matcher<ExpressionT> const& matcher ) {
m_matchers.push_back( matcher.clone() );
return *this;
}
virtual bool match( ExpressionT const& expr ) const
{
for( std::size_t i = 0; i < m_matchers.size(); ++i )
if( m_matchers[i]->match( expr ) )
return true;
return false;
}
virtual std::string toString() const {
std::ostringstream oss;
oss << "( ";
for( std::size_t i = 0; i < m_matchers.size(); ++i ) {
if( i != 0 )
oss << " or ";
oss << m_matchers[i]->toString();
}
oss << " )";
return oss.str();
}
private:
std::vector<Ptr<Matcher<ExpressionT> > > m_matchers;
};
}
namespace StdString {
inline std::string makeString( std::string const& str ) { return str; }
inline std::string makeString( const char* str ) { return str ? std::string( str ) : std::string(); }
struct Equals : MatcherImpl<Equals, std::string> {
Equals( std::string const& str ) : m_str( str ){}
Equals( Equals const& other ) : m_str( other.m_str ){}
virtual ~Equals();
virtual bool match( std::string const& expr ) const {
return m_str == expr;
}
virtual std::string toString() const {
return "equals: \"" + m_str + "\"";
}
std::string m_str;
};
struct Contains : MatcherImpl<Contains, std::string> {
Contains( std::string const& substr ) : m_substr( substr ){}
Contains( Contains const& other ) : m_substr( other.m_substr ){}
virtual ~Contains();
virtual bool match( std::string const& expr ) const {
return expr.find( m_substr ) != std::string::npos;
}
virtual std::string toString() const {
return "contains: \"" + m_substr + "\"";
}
std::string m_substr;
};
struct StartsWith : MatcherImpl<StartsWith, std::string> {
StartsWith( std::string const& substr ) : m_substr( substr ){}
StartsWith( StartsWith const& other ) : m_substr( other.m_substr ){}
virtual ~StartsWith();
virtual bool match( std::string const& expr ) const {
return expr.find( m_substr ) == 0;
}
virtual std::string toString() const {
return "starts with: \"" + m_substr + "\"";
}
std::string m_substr;
};
struct EndsWith : MatcherImpl<EndsWith, std::string> {
EndsWith( std::string const& substr ) : m_substr( substr ){}
EndsWith( EndsWith const& other ) : m_substr( other.m_substr ){}
virtual ~EndsWith();
virtual bool match( std::string const& expr ) const {
return expr.find( m_substr ) == expr.size() - m_substr.size();
}
virtual std::string toString() const {
return "ends with: \"" + m_substr + "\"";
}
std::string m_substr;
};
} // namespace StdString
} // namespace Impl
// The following functions create the actual matcher objects.
// This allows the types to be inferred
template<typename ExpressionT>
inline Impl::Generic::AllOf<ExpressionT> AllOf( Impl::Matcher<ExpressionT> const& m1,
Impl::Matcher<ExpressionT> const& m2 ) {
return Impl::Generic::AllOf<ExpressionT>().add( m1 ).add( m2 );
}
template<typename ExpressionT>
inline Impl::Generic::AllOf<ExpressionT> AllOf( Impl::Matcher<ExpressionT> const& m1,
Impl::Matcher<ExpressionT> const& m2,
Impl::Matcher<ExpressionT> const& m3 ) {
return Impl::Generic::AllOf<ExpressionT>().add( m1 ).add( m2 ).add( m3 );
}
template<typename ExpressionT>
inline Impl::Generic::AnyOf<ExpressionT> AnyOf( Impl::Matcher<ExpressionT> const& m1,
Impl::Matcher<ExpressionT> const& m2 ) {
return Impl::Generic::AnyOf<ExpressionT>().add( m1 ).add( m2 );
}
template<typename ExpressionT>
inline Impl::Generic::AnyOf<ExpressionT> AnyOf( Impl::Matcher<ExpressionT> const& m1,
Impl::Matcher<ExpressionT> const& m2,
Impl::Matcher<ExpressionT> const& m3 ) {
return Impl::Generic::AnyOf<ExpressionT>().add( m1 ).add( m2 ).add( m3 );
}
inline Impl::StdString::Equals Equals( std::string const& str ) {
return Impl::StdString::Equals( str );
}
inline Impl::StdString::Equals Equals( const char* str ) {
return Impl::StdString::Equals( Impl::StdString::makeString( str ) );
}
inline Impl::StdString::Contains Contains( std::string const& substr ) {
return Impl::StdString::Contains( substr );
}
inline Impl::StdString::Contains Contains( const char* substr ) {
return Impl::StdString::Contains( Impl::StdString::makeString( substr ) );
}
inline Impl::StdString::StartsWith StartsWith( std::string const& substr ) {
return Impl::StdString::StartsWith( substr );
}
inline Impl::StdString::StartsWith StartsWith( const char* substr ) {
return Impl::StdString::StartsWith( Impl::StdString::makeString( substr ) );
}
inline Impl::StdString::EndsWith EndsWith( std::string const& substr ) {
return Impl::StdString::EndsWith( substr );
}
inline Impl::StdString::EndsWith EndsWith( const char* substr ) {
return Impl::StdString::EndsWith( Impl::StdString::makeString( substr ) );
}
} // namespace Matchers
using namespace Matchers;
} // namespace Catch
// #included from: internal/catch_interfaces_tag_alias_registry.h
#define TWOBLUECUBES_CATCH_INTERFACES_TAG_ALIAS_REGISTRY_H_INCLUDED
// #included from: catch_tag_alias.h
#define TWOBLUECUBES_CATCH_TAG_ALIAS_H_INCLUDED
#include <string>
namespace Catch {
struct TagAlias {
TagAlias( std::string _tag, SourceLineInfo _lineInfo ) : tag( _tag ), lineInfo( _lineInfo ) {}
std::string tag;
SourceLineInfo lineInfo;
};
struct RegistrarForTagAliases {
RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo );
};
} // end namespace Catch
#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); }
// #included from: catch_option.hpp
#define TWOBLUECUBES_CATCH_OPTION_HPP_INCLUDED
namespace Catch {
// An optional type
template<typename T>
class Option {
public:
Option() : nullableValue( NULL ) {}
Option( T const& _value )
: nullableValue( new( storage ) T( _value ) )
{}
Option( Option const& _other )
: nullableValue( _other ? new( storage ) T( *_other ) : NULL )
{}
~Option() {
reset();
}
Option& operator= ( Option const& _other ) {
if( &_other != this ) {
reset();
if( _other )
nullableValue = new( storage ) T( *_other );
}
return *this;
}
Option& operator = ( T const& _value ) {
reset();
nullableValue = new( storage ) T( _value );
return *this;
}
void reset() {
if( nullableValue )
nullableValue->~T();
nullableValue = NULL;
}
T& operator*() { return *nullableValue; }
T const& operator*() const { return *nullableValue; }
T* operator->() { return nullableValue; }
const T* operator->() const { return nullableValue; }
T valueOr( T const& defaultValue ) const {
return nullableValue ? *nullableValue : defaultValue;
}
bool some() const { return nullableValue != NULL; }
bool none() const { return nullableValue == NULL; }
bool operator !() const { return nullableValue == NULL; }
operator SafeBool::type() const {
return SafeBool::makeSafe( some() );
}
private:
T* nullableValue;
char storage[sizeof(T)];
};
} // end namespace Catch
namespace Catch {
struct ITagAliasRegistry {
virtual ~ITagAliasRegistry();
virtual Option<TagAlias> find( std::string const& alias ) const = 0;
virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0;
static ITagAliasRegistry const& get();
};
} // end namespace Catch
// These files are included here so the single_include script doesn't put them
// in the conditionally compiled sections
// #included from: internal/catch_test_case_info.h
#define TWOBLUECUBES_CATCH_TEST_CASE_INFO_H_INCLUDED
#include <string>
#include <set>
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#endif
namespace Catch {
struct ITestCase;
struct TestCaseInfo {
enum SpecialProperties{
None = 0,
IsHidden = 1 << 1,
ShouldFail = 1 << 2,
MayFail = 1 << 3,
Throws = 1 << 4
};
TestCaseInfo( std::string const& _name,
std::string const& _className,
std::string const& _description,
std::set<std::string> const& _tags,
SourceLineInfo const& _lineInfo );
TestCaseInfo( TestCaseInfo const& other );
bool isHidden() const;
bool throws() const;
bool okToFail() const;
bool expectedToFail() const;
std::string name;
std::string className;
std::string description;
std::set<std::string> tags;
std::set<std::string> lcaseTags;
std::string tagsAsString;
SourceLineInfo lineInfo;
SpecialProperties properties;
};
class TestCase : public TestCaseInfo {
public:
TestCase( ITestCase* testCase, TestCaseInfo const& info );
TestCase( TestCase const& other );
TestCase withName( std::string const& _newName ) const;
void invoke() const;
TestCaseInfo const& getTestCaseInfo() const;
void swap( TestCase& other );
bool operator == ( TestCase const& other ) const;
bool operator < ( TestCase const& other ) const;
TestCase& operator = ( TestCase const& other );
private:
Ptr<ITestCase> test;
};
TestCase makeTestCase( ITestCase* testCase,
std::string const& className,
std::string const& name,
std::string const& description,
SourceLineInfo const& lineInfo );
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __OBJC__
// #included from: internal/catch_objc.hpp
#define TWOBLUECUBES_CATCH_OBJC_HPP_INCLUDED
#import <objc/runtime.h>
#include <string>
// NB. Any general catch headers included here must be included
// in catch.hpp first to make sure they are included by the single
// header for non obj-usage
///////////////////////////////////////////////////////////////////////////////
// This protocol is really only here for (self) documenting purposes, since
// all its methods are optional.
@protocol OcFixture
@optional
-(void) setUp;
-(void) tearDown;
@end
namespace Catch {
class OcMethod : public SharedImpl<ITestCase> {
public:
OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {}
virtual void invoke() const {
id obj = [[m_cls alloc] init];
performOptionalSelector( obj, @selector(setUp) );
performOptionalSelector( obj, m_sel );
performOptionalSelector( obj, @selector(tearDown) );
arcSafeRelease( obj );
}
private:
virtual ~OcMethod() {}
Class m_cls;
SEL m_sel;
};
namespace Detail{
inline std::string getAnnotation( Class cls,
std::string const& annotationName,
std::string const& testCaseName ) {
NSString* selStr = [[NSString alloc] initWithFormat:@"Catch_%s_%s", annotationName.c_str(), testCaseName.c_str()];
SEL sel = NSSelectorFromString( selStr );
arcSafeRelease( selStr );
id value = performOptionalSelector( cls, sel );
if( value )
return [(NSString*)value UTF8String];
return "";
}
}
inline size_t registerTestMethods() {
size_t noTestMethods = 0;
int noClasses = objc_getClassList( NULL, 0 );
Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses);
objc_getClassList( classes, noClasses );
for( int c = 0; c < noClasses; c++ ) {
Class cls = classes[c];
{
u_int count;
Method* methods = class_copyMethodList( cls, &count );
for( u_int m = 0; m < count ; m++ ) {
SEL selector = method_getName(methods[m]);
std::string methodName = sel_getName(selector);
if( startsWith( methodName, "Catch_TestCase_" ) ) {
std::string testCaseName = methodName.substr( 15 );
std::string name = Detail::getAnnotation( cls, "Name", testCaseName );
std::string desc = Detail::getAnnotation( cls, "Description", testCaseName );
const char* className = class_getName( cls );
getMutableRegistryHub().registerTest( makeTestCase( new OcMethod( cls, selector ), className, name.c_str(), desc.c_str(), SourceLineInfo() ) );
noTestMethods++;
}
}
free(methods);
}
}
return noTestMethods;
}
namespace Matchers {
namespace Impl {
namespace NSStringMatchers {
template<typename MatcherT>
struct StringHolder : MatcherImpl<MatcherT, NSString*>{
StringHolder( NSString* substr ) : m_substr( [substr copy] ){}
StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){}
StringHolder() {
arcSafeRelease( m_substr );
}
NSString* m_substr;
};
struct Equals : StringHolder<Equals> {
Equals( NSString* substr ) : StringHolder( substr ){}
virtual bool match( ExpressionType const& str ) const {
return (str != nil || m_substr == nil ) &&
[str isEqualToString:m_substr];
}
virtual std::string toString() const {
return "equals string: " + Catch::toString( m_substr );
}
};
struct Contains : StringHolder<Contains> {
Contains( NSString* substr ) : StringHolder( substr ){}
virtual bool match( ExpressionType const& str ) const {
return (str != nil || m_substr == nil ) &&
[str rangeOfString:m_substr].location != NSNotFound;
}
virtual std::string toString() const {
return "contains string: " + Catch::toString( m_substr );
}
};
struct StartsWith : StringHolder<StartsWith> {
StartsWith( NSString* substr ) : StringHolder( substr ){}
virtual bool match( ExpressionType const& str ) const {
return (str != nil || m_substr == nil ) &&
[str rangeOfString:m_substr].location == 0;
}
virtual std::string toString() const {
return "starts with: " + Catch::toString( m_substr );
}
};
struct EndsWith : StringHolder<EndsWith> {
EndsWith( NSString* substr ) : StringHolder( substr ){}
virtual bool match( ExpressionType const& str ) const {
return (str != nil || m_substr == nil ) &&
[str rangeOfString:m_substr].location == [str length] - [m_substr length];
}
virtual std::string toString() const {
return "ends with: " + Catch::toString( m_substr );
}
};
} // namespace NSStringMatchers
} // namespace Impl
inline Impl::NSStringMatchers::Equals
Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); }
inline Impl::NSStringMatchers::Contains
Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); }
inline Impl::NSStringMatchers::StartsWith
StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); }
inline Impl::NSStringMatchers::EndsWith
EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); }
} // namespace Matchers
using namespace Matchers;
} // namespace Catch
///////////////////////////////////////////////////////////////////////////////
#define OC_TEST_CASE( name, desc )\
+(NSString*) INTERNAL_CATCH_UNIQUE_NAME( Catch_Name_test ) \
{\
return @ name; \
}\
+(NSString*) INTERNAL_CATCH_UNIQUE_NAME( Catch_Description_test ) \
{ \
return @ desc; \
} \
-(void) INTERNAL_CATCH_UNIQUE_NAME( Catch_TestCase_test )
#endif
#ifdef CATCH_CONFIG_RUNNER
// #included from: internal/catch_impl.hpp
#define TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED
// Collect all the implementation files together here
// These are the equivalent of what would usually be cpp files
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
// #included from: catch_runner.hpp
#define TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED
// #included from: internal/catch_commandline.hpp
#define TWOBLUECUBES_CATCH_COMMANDLINE_HPP_INCLUDED
// #included from: catch_config.hpp
#define TWOBLUECUBES_CATCH_CONFIG_HPP_INCLUDED
// #included from: catch_test_spec_parser.hpp
#define TWOBLUECUBES_CATCH_TEST_SPEC_PARSER_HPP_INCLUDED
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#endif
// #included from: catch_test_spec.hpp
#define TWOBLUECUBES_CATCH_TEST_SPEC_HPP_INCLUDED
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
#endif
#include <string>
#include <vector>
namespace Catch {
class TestSpec {
struct Pattern : SharedImpl<> {
virtual ~Pattern();
virtual bool matches( TestCaseInfo const& testCase ) const = 0;
};
class NamePattern : public Pattern {
enum WildcardPosition {
NoWildcard = 0,
WildcardAtStart = 1,
WildcardAtEnd = 2,
WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd
};
public:
NamePattern( std::string const& name ) : m_name( toLower( name ) ), m_wildcard( NoWildcard ) {
if( startsWith( m_name, "*" ) ) {
m_name = m_name.substr( 1 );
m_wildcard = WildcardAtStart;
}
if( endsWith( m_name, "*" ) ) {
m_name = m_name.substr( 0, m_name.size()-1 );
m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
}
}
virtual ~NamePattern();
virtual bool matches( TestCaseInfo const& testCase ) const {
switch( m_wildcard ) {
case NoWildcard:
return m_name == toLower( testCase.name );
case WildcardAtStart:
return endsWith( toLower( testCase.name ), m_name );
case WildcardAtEnd:
return startsWith( toLower( testCase.name ), m_name );
case WildcardAtBothEnds:
return contains( toLower( testCase.name ), m_name );
}
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunreachable-code"
#endif
throw std::logic_error( "Unknown enum" );
#ifdef __clang__
#pragma clang diagnostic pop
#endif
}
private:
std::string m_name;
WildcardPosition m_wildcard;
};
class TagPattern : public Pattern {
public:
TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
virtual ~TagPattern();
virtual bool matches( TestCaseInfo const& testCase ) const {
return testCase.lcaseTags.find( m_tag ) != testCase.lcaseTags.end();
}
private:
std::string m_tag;
};
class ExcludedPattern : public Pattern {
public:
ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_underlyingPattern( underlyingPattern ) {}
virtual ~ExcludedPattern();
virtual bool matches( TestCaseInfo const& testCase ) const { return !m_underlyingPattern->matches( testCase ); }
private:
Ptr<Pattern> m_underlyingPattern;
};
struct Filter {
std::vector<Ptr<Pattern> > m_patterns;
bool matches( TestCaseInfo const& testCase ) const {
// All patterns in a filter must match for the filter to be a match
for( std::vector<Ptr<Pattern> >::const_iterator it = m_patterns.begin(), itEnd = m_patterns.end(); it != itEnd; ++it )
if( !(*it)->matches( testCase ) )
return false;
return true;
}
};
public:
bool hasFilters() const {
return !m_filters.empty();
}
bool matches( TestCaseInfo const& testCase ) const {
// A TestSpec matches if any filter matches
for( std::vector<Filter>::const_iterator it = m_filters.begin(), itEnd = m_filters.end(); it != itEnd; ++it )
if( it->matches( testCase ) )
return true;
return false;
}
private:
std::vector<Filter> m_filters;
friend class TestSpecParser;
};
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace Catch {
class TestSpecParser {
enum Mode{ None, Name, QuotedName, Tag };
Mode m_mode;
bool m_exclusion;
std::size_t m_start, m_pos;
std::string m_arg;
TestSpec::Filter m_currentFilter;
TestSpec m_testSpec;
ITagAliasRegistry const* m_tagAliases;
public:
TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases( &tagAliases ) {}
TestSpecParser& parse( std::string const& arg ) {
m_mode = None;
m_exclusion = false;
m_start = std::string::npos;
m_arg = m_tagAliases->expandAliases( arg );
for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )
visitChar( m_arg[m_pos] );
if( m_mode == Name )
addPattern<TestSpec::NamePattern>();
return *this;
}
TestSpec testSpec() {
addFilter();
return m_testSpec;
}
private:
void visitChar( char c ) {
if( m_mode == None ) {
switch( c ) {
case ' ': return;
case '~': m_exclusion = true; return;
case '[': return startNewMode( Tag, ++m_pos );
case '"': return startNewMode( QuotedName, ++m_pos );
default: startNewMode( Name, m_pos ); break;
}
}
if( m_mode == Name ) {
if( c == ',' ) {
addPattern<TestSpec::NamePattern>();
addFilter();
}
else if( c == '[' ) {
if( subString() == "exclude:" )
m_exclusion = true;
else
addPattern<TestSpec::NamePattern>();
startNewMode( Tag, ++m_pos );
}
}
else if( m_mode == QuotedName && c == '"' )
addPattern<TestSpec::NamePattern>();
else if( m_mode == Tag && c == ']' )
addPattern<TestSpec::TagPattern>();
}
void startNewMode( Mode mode, std::size_t start ) {
m_mode = mode;
m_start = start;
}
std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
template<typename T>
void addPattern() {
std::string token = subString();
if( startsWith( token, "exclude:" ) ) {
m_exclusion = true;
token = token.substr( 8 );
}
if( !token.empty() ) {
Ptr<TestSpec::Pattern> pattern = new T( token );
if( m_exclusion )
pattern = new TestSpec::ExcludedPattern( pattern );
m_currentFilter.m_patterns.push_back( pattern );
}
m_exclusion = false;
m_mode = None;
}
void addFilter() {
if( !m_currentFilter.m_patterns.empty() ) {
m_testSpec.m_filters.push_back( m_currentFilter );
m_currentFilter = TestSpec::Filter();
}
}
};
inline TestSpec parseTestSpec( std::string const& arg ) {
return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();
}
} // namespace Catch
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// #included from: catch_interfaces_config.h
#define TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED
#include <iostream>
#include <string>
#include <vector>
namespace Catch {
struct Verbosity { enum Level {
NoOutput = 0,
Quiet,
Normal
}; };
struct WarnAbout { enum What {
Nothing = 0x00,
NoAssertions = 0x01
}; };
struct ShowDurations { enum OrNot {
DefaultForReporter,
Always,
Never
}; };
class TestSpec;
struct IConfig : IShared {
virtual ~IConfig();
virtual bool allowThrows() const = 0;
virtual std::ostream& stream() const = 0;
virtual std::string name() const = 0;
virtual bool includeSuccessfulResults() const = 0;
virtual bool shouldDebugBreak() const = 0;
virtual bool warnAboutMissingAssertions() const = 0;
virtual int abortAfter() const = 0;
virtual bool showInvisibles() const = 0;
virtual ShowDurations::OrNot showDurations() const = 0;
virtual TestSpec const& testSpec() const = 0;
};
}
// #included from: catch_stream.h
#define TWOBLUECUBES_CATCH_STREAM_H_INCLUDED
#include <streambuf>
#ifdef __clang__
#pragma clang diagnostic ignored "-Wpadded"
#endif
namespace Catch {
class Stream {
public:
Stream();
Stream( std::streambuf* _streamBuf, bool _isOwned );
void release();
std::streambuf* streamBuf;
private:
bool isOwned;
};
}
#include <memory>
#include <vector>
#include <string>
#include <iostream>
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
#define CATCH_CONFIG_CONSOLE_WIDTH 80
#endif
namespace Catch {
struct ConfigData {
ConfigData()
: listTests( false ),
listTags( false ),
listReporters( false ),
listTestNamesOnly( false ),
showSuccessfulTests( false ),
shouldDebugBreak( false ),
noThrow( false ),
showHelp( false ),
showInvisibles( false ),
abortAfter( -1 ),
verbosity( Verbosity::Normal ),
warnings( WarnAbout::Nothing ),
showDurations( ShowDurations::DefaultForReporter )
{}
bool listTests;
bool listTags;
bool listReporters;
bool listTestNamesOnly;
bool showSuccessfulTests;
bool shouldDebugBreak;
bool noThrow;
bool showHelp;
bool showInvisibles;
int abortAfter;
Verbosity::Level verbosity;
WarnAbout::What warnings;
ShowDurations::OrNot showDurations;
std::string reporterName;
std::string outputFilename;
std::string name;
std::string processName;
std::vector<std::string> testsOrTags;
};
class Config : public SharedImpl<IConfig> {
private:
Config( Config const& other );
Config& operator = ( Config const& other );
virtual void dummy();
public:
Config()
: m_os( std::cout.rdbuf() )
{}
Config( ConfigData const& data )
: m_data( data ),
m_os( std::cout.rdbuf() )
{
if( !data.testsOrTags.empty() ) {
TestSpecParser parser( ITagAliasRegistry::get() );
for( std::size_t i = 0; i < data.testsOrTags.size(); ++i )
parser.parse( data.testsOrTags[i] );
m_testSpec = parser.testSpec();
}
}
virtual ~Config() {
m_os.rdbuf( std::cout.rdbuf() );
m_stream.release();
}
void setFilename( std::string const& filename ) {
m_data.outputFilename = filename;
}
std::string const& getFilename() const {
return m_data.outputFilename ;
}
bool listTests() const { return m_data.listTests; }
bool listTestNamesOnly() const { return m_data.listTestNamesOnly; }
bool listTags() const { return m_data.listTags; }
bool listReporters() const { return m_data.listReporters; }
std::string getProcessName() const { return m_data.processName; }
bool shouldDebugBreak() const { return m_data.shouldDebugBreak; }
void setStreamBuf( std::streambuf* buf ) {
m_os.rdbuf( buf ? buf : std::cout.rdbuf() );
}
void useStream( std::string const& streamName ) {
Stream stream = createStream( streamName );
setStreamBuf( stream.streamBuf );
m_stream.release();
m_stream = stream;
}
std::string getReporterName() const { return m_data.reporterName; }
int abortAfter() const { return m_data.abortAfter; }
TestSpec const& testSpec() const { return m_testSpec; }
bool showHelp() const { return m_data.showHelp; }
bool showInvisibles() const { return m_data.showInvisibles; }
// IConfig interface
virtual bool allowThrows() const { return !m_data.noThrow; }
virtual std::ostream& stream() const { return m_os; }
virtual std::string name() const { return m_data.name.empty() ? m_data.processName : m_data.name; }
virtual bool includeSuccessfulResults() const { return m_data.showSuccessfulTests; }
virtual bool warnAboutMissingAssertions() const { return m_data.warnings & WarnAbout::NoAssertions; }
virtual ShowDurations::OrNot showDurations() const { return m_data.showDurations; }
private:
ConfigData m_data;
Stream m_stream;
mutable std::ostream m_os;
TestSpec m_testSpec;
};
} // end namespace Catch
// #included from: catch_clara.h
#define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
// Use Catch's value for console width (store Clara's off to the side, if present)
#ifdef CLARA_CONFIG_CONSOLE_WIDTH
#define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CLARA_CONFIG_CONSOLE_WIDTH
#undef CLARA_CONFIG_CONSOLE_WIDTH
#endif
#define CLARA_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH
// Declare Clara inside the Catch namespace
#define STITCH_CLARA_OPEN_NAMESPACE namespace Catch {
// #included from: ../external/clara.h
// Only use header guard if we are not using an outer namespace
#if !defined(TWOBLUECUBES_CLARA_H_INCLUDED) || defined(STITCH_CLARA_OPEN_NAMESPACE)
#ifndef STITCH_CLARA_OPEN_NAMESPACE
#define TWOBLUECUBES_CLARA_H_INCLUDED
#define STITCH_CLARA_OPEN_NAMESPACE
#define STITCH_CLARA_CLOSE_NAMESPACE
#else
#define STITCH_CLARA_CLOSE_NAMESPACE }
#endif
#define STITCH_TBC_TEXT_FORMAT_OPEN_NAMESPACE STITCH_CLARA_OPEN_NAMESPACE
// ----------- #included from tbc_text_format.h -----------
// Only use header guard if we are not using an outer namespace
#if !defined(TBC_TEXT_FORMAT_H_INCLUDED) || defined(STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE)
#ifndef STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE
#define TBC_TEXT_FORMAT_H_INCLUDED
#endif
#include <string>
#include <vector>
#include <sstream>
// Use optional outer namespace
#ifdef STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE
namespace STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE {
#endif
namespace Tbc {
#ifdef TBC_TEXT_FORMAT_CONSOLE_WIDTH
const unsigned int consoleWidth = TBC_TEXT_FORMAT_CONSOLE_WIDTH;
#else
const unsigned int consoleWidth = 80;
#endif
struct TextAttributes {
TextAttributes()
: initialIndent( std::string::npos ),
indent( 0 ),
width( consoleWidth-1 ),
tabChar( '\t' )
{}
TextAttributes& setInitialIndent( std::size_t _value ) { initialIndent = _value; return *this; }
TextAttributes& setIndent( std::size_t _value ) { indent = _value; return *this; }
TextAttributes& setWidth( std::size_t _value ) { width = _value; return *this; }
TextAttributes& setTabChar( char _value ) { tabChar = _value; return *this; }
std::size_t initialIndent; // indent of first line, or npos
std::size_t indent; // indent of subsequent lines, or all if initialIndent is npos
std::size_t width; // maximum width of text, including indent. Longer text will wrap
char tabChar; // If this char is seen the indent is changed to current pos
};
class Text {
public:
Text( std::string const& _str, TextAttributes const& _attr = TextAttributes() )
: attr( _attr )
{
std::string wrappableChars = " [({.,/|\\-";
std::size_t indent = _attr.initialIndent != std::string::npos
? _attr.initialIndent
: _attr.indent;
std::string remainder = _str;
while( !remainder.empty() ) {
if( lines.size() >= 1000 ) {
lines.push_back( "... message truncated due to excessive size" );
return;
}
std::size_t tabPos = std::string::npos;
std::size_t width = (std::min)( remainder.size(), _attr.width - indent );
std::size_t pos = remainder.find_first_of( '\n' );
if( pos <= width ) {
width = pos;
}
pos = remainder.find_last_of( _attr.tabChar, width );
if( pos != std::string::npos ) {
tabPos = pos;
if( remainder[width] == '\n' )
width--;
remainder = remainder.substr( 0, tabPos ) + remainder.substr( tabPos+1 );
}
if( width == remainder.size() ) {
spliceLine( indent, remainder, width );
}
else if( remainder[width] == '\n' ) {
spliceLine( indent, remainder, width );
if( width <= 1 || remainder.size() != 1 )
remainder = remainder.substr( 1 );
indent = _attr.indent;
}
else {
pos = remainder.find_last_of( wrappableChars, width );
if( pos != std::string::npos && pos > 0 ) {
spliceLine( indent, remainder, pos );
if( remainder[0] == ' ' )
remainder = remainder.substr( 1 );
}
else {
spliceLine( indent, remainder, width-1 );
lines.back() += "-";
}
if( lines.size() == 1 )
indent = _attr.indent;
if( tabPos != std::string::npos )
indent += tabPos;
}
}
}
void spliceLine( std::size_t _indent, std::string& _remainder, std::size_t _pos ) {
lines.push_back( std::string( _indent, ' ' ) + _remainder.substr( 0, _pos ) );
_remainder = _remainder.substr( _pos );
}
typedef std::vector<std::string>::const_iterator const_iterator;
const_iterator begin() const { return lines.begin(); }
const_iterator end() const { return lines.end(); }
std::string const& last() const { return lines.back(); }
std::size_t size() const { return lines.size(); }
std::string const& operator[]( std::size_t _index ) const { return lines[_index]; }
std::string toString() const {
std::ostringstream oss;
oss << *this;
return oss.str();
}
inline friend std::ostream& operator << ( std::ostream& _stream, Text const& _text ) {
for( Text::const_iterator it = _text.begin(), itEnd = _text.end();
it != itEnd; ++it ) {
if( it != _text.begin() )
_stream << "\n";
_stream << *it;
}
return _stream;
}
private:
std::string str;
TextAttributes attr;
std::vector<std::string> lines;
};
} // end namespace Tbc
#ifdef STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE
} // end outer namespace
#endif
#endif // TBC_TEXT_FORMAT_H_INCLUDED
// ----------- end of #include from tbc_text_format.h -----------
// ........... back in /Users/philnash/Dev/OSS/Clara/srcs/clara.h
#undef STITCH_TBC_TEXT_FORMAT_OPEN_NAMESPACE
#include <map>
#include <algorithm>
#include <stdexcept>
#include <memory>
// Use optional outer namespace
#ifdef STITCH_CLARA_OPEN_NAMESPACE
STITCH_CLARA_OPEN_NAMESPACE
#endif
namespace Clara {
struct UnpositionalTag {};
extern UnpositionalTag _;
#ifdef CLARA_CONFIG_MAIN
UnpositionalTag _;
#endif
namespace Detail {
#ifdef CLARA_CONSOLE_WIDTH
const unsigned int consoleWidth = CLARA_CONFIG_CONSOLE_WIDTH;
#else
const unsigned int consoleWidth = 80;
#endif
using namespace Tbc;
inline bool startsWith( std::string const& str, std::string const& prefix ) {
return str.size() >= prefix.size() && str.substr( 0, prefix.size() ) == prefix;
}
template<typename T> struct RemoveConstRef{ typedef T type; };
template<typename T> struct RemoveConstRef<T&>{ typedef T type; };
template<typename T> struct RemoveConstRef<T const&>{ typedef T type; };
template<typename T> struct RemoveConstRef<T const>{ typedef T type; };
template<typename T> struct IsBool { static const bool value = false; };
template<> struct IsBool<bool> { static const bool value = true; };
template<typename T>
void convertInto( std::string const& _source, T& _dest ) {
std::stringstream ss;
ss << _source;
ss >> _dest;
if( ss.fail() )
throw std::runtime_error( "Unable to convert " + _source + " to destination type" );
}
inline void convertInto( std::string const& _source, std::string& _dest ) {
_dest = _source;
}
inline void convertInto( std::string const& _source, bool& _dest ) {
std::string sourceLC = _source;
std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), ::tolower );
if( sourceLC == "y" || sourceLC == "1" || sourceLC == "true" || sourceLC == "yes" || sourceLC == "on" )
_dest = true;
else if( sourceLC == "n" || sourceLC == "0" || sourceLC == "false" || sourceLC == "no" || sourceLC == "off" )
_dest = false;
else
throw std::runtime_error( "Expected a boolean value but did not recognise:\n '" + _source + "'" );
}
inline void convertInto( bool _source, bool& _dest ) {
_dest = _source;
}
template<typename T>
inline void convertInto( bool, T& ) {
throw std::runtime_error( "Invalid conversion" );
}
template<typename ConfigT>
struct IArgFunction {
virtual ~IArgFunction() {}
# ifdef CATCH_CPP11_OR_GREATER
IArgFunction() = default;
IArgFunction( IArgFunction const& ) = default;
# endif
virtual void set( ConfigT& config, std::string const& value ) const = 0;
virtual void setFlag( ConfigT& config ) const = 0;
virtual bool takesArg() const = 0;
virtual IArgFunction* clone() const = 0;
};
template<typename ConfigT>
class BoundArgFunction {
public:
BoundArgFunction() : functionObj( NULL ) {}
BoundArgFunction( IArgFunction<ConfigT>* _functionObj ) : functionObj( _functionObj ) {}
BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj ? other.functionObj->clone() : NULL ) {}
BoundArgFunction& operator = ( BoundArgFunction const& other ) {
IArgFunction<ConfigT>* newFunctionObj = other.functionObj ? other.functionObj->clone() : NULL;
delete functionObj;
functionObj = newFunctionObj;
return *this;
}
~BoundArgFunction() { delete functionObj; }
void set( ConfigT& config, std::string const& value ) const {
functionObj->set( config, value );
}
void setFlag( ConfigT& config ) const {
functionObj->setFlag( config );
}
bool takesArg() const { return functionObj->takesArg(); }
bool isSet() const {
return functionObj != NULL;
}
private:
IArgFunction<ConfigT>* functionObj;
};
template<typename C>
struct NullBinder : IArgFunction<C>{
virtual void set( C&, std::string const& ) const {}
virtual void setFlag( C& ) const {}
virtual bool takesArg() const { return true; }
virtual IArgFunction<C>* clone() const { return new NullBinder( *this ); }
};
template<typename C, typename M>
struct BoundDataMember : IArgFunction<C>{
BoundDataMember( M C::* _member ) : member( _member ) {}
virtual void set( C& p, std::string const& stringValue ) const {
convertInto( stringValue, p.*member );
}
virtual void setFlag( C& p ) const {
convertInto( true, p.*member );
}
virtual bool takesArg() const { return !IsBool<M>::value; }
virtual IArgFunction<C>* clone() const { return new BoundDataMember( *this ); }
M C::* member;
};
template<typename C, typename M>
struct BoundUnaryMethod : IArgFunction<C>{
BoundUnaryMethod( void (C::*_member)( M ) ) : member( _member ) {}
virtual void set( C& p, std::string const& stringValue ) const {
typename RemoveConstRef<M>::type value;
convertInto( stringValue, value );
(p.*member)( value );
}
virtual void setFlag( C& p ) const {
typename RemoveConstRef<M>::type value;
convertInto( true, value );
(p.*member)( value );
}
virtual bool takesArg() const { return !IsBool<M>::value; }
virtual IArgFunction<C>* clone() const { return new BoundUnaryMethod( *this ); }
void (C::*member)( M );
};
template<typename C>
struct BoundNullaryMethod : IArgFunction<C>{
BoundNullaryMethod( void (C::*_member)() ) : member( _member ) {}
virtual void set( C& p, std::string const& stringValue ) const {
bool value;
convertInto( stringValue, value );
if( value )
(p.*member)();
}
virtual void setFlag( C& p ) const {
(p.*member)();
}
virtual bool takesArg() const { return false; }
virtual IArgFunction<C>* clone() const { return new BoundNullaryMethod( *this ); }
void (C::*member)();
};
template<typename C>
struct BoundUnaryFunction : IArgFunction<C>{
BoundUnaryFunction( void (*_function)( C& ) ) : function( _function ) {}
virtual void set( C& obj, std::string const& stringValue ) const {
bool value;
convertInto( stringValue, value );
if( value )
function( obj );
}
virtual void setFlag( C& p ) const {
function( p );
}
virtual bool takesArg() const { return false; }
virtual IArgFunction<C>* clone() const { return new BoundUnaryFunction( *this ); }
void (*function)( C& );
};
template<typename C, typename T>
struct BoundBinaryFunction : IArgFunction<C>{
BoundBinaryFunction( void (*_function)( C&, T ) ) : function( _function ) {}
virtual void set( C& obj, std::string const& stringValue ) const {
typename RemoveConstRef<T>::type value;
convertInto( stringValue, value );
function( obj, value );
}
virtual void setFlag( C& obj ) const {
typename RemoveConstRef<T>::type value;
convertInto( true, value );
function( obj, value );
}
virtual bool takesArg() const { return !IsBool<T>::value; }
virtual IArgFunction<C>* clone() const { return new BoundBinaryFunction( *this ); }
void (*function)( C&, T );
};
} // namespace Detail
struct Parser {
Parser() : separators( " \t=:" ) {}
struct Token {
enum Type { Positional, ShortOpt, LongOpt };
Token( Type _type, std::string const& _data ) : type( _type ), data( _data ) {}
Type type;
std::string data;
};
void parseIntoTokens( int argc, char const * const * argv, std::vector<Parser::Token>& tokens ) const {
const std::string doubleDash = "--";
for( int i = 1; i < argc && argv[i] != doubleDash; ++i )
parseIntoTokens( argv[i] , tokens);
}
void parseIntoTokens( std::string arg, std::vector<Parser::Token>& tokens ) const {
while( !arg.empty() ) {
Parser::Token token( Parser::Token::Positional, arg );
arg = "";
if( token.data[0] == '-' ) {
if( token.data.size() > 1 && token.data[1] == '-' ) {
token = Parser::Token( Parser::Token::LongOpt, token.data.substr( 2 ) );
}
else {
token = Parser::Token( Parser::Token::ShortOpt, token.data.substr( 1 ) );
if( token.data.size() > 1 && separators.find( token.data[1] ) == std::string::npos ) {
arg = "-" + token.data.substr( 1 );
token.data = token.data.substr( 0, 1 );
}
}
}
if( token.type != Parser::Token::Positional ) {
std::size_t pos = token.data.find_first_of( separators );
if( pos != std::string::npos ) {
arg = token.data.substr( pos+1 );
token.data = token.data.substr( 0, pos );
}
}
tokens.push_back( token );
}
}
std::string separators;
};
template<typename ConfigT>
struct CommonArgProperties {
CommonArgProperties() {}
CommonArgProperties( Detail::BoundArgFunction<ConfigT> const& _boundField ) : boundField( _boundField ) {}
Detail::BoundArgFunction<ConfigT> boundField;
std::string description;
std::string detail;
std::string placeholder; // Only value if boundField takes an arg
bool takesArg() const {
return !placeholder.empty();
}
void validate() const {
if( !boundField.isSet() )
throw std::logic_error( "option not bound" );
}
};
struct OptionArgProperties {
std::vector<std::string> shortNames;
std::string longName;
bool hasShortName( std::string const& shortName ) const {
return std::find( shortNames.begin(), shortNames.end(), shortName ) != shortNames.end();
}
bool hasLongName( std::string const& _longName ) const {
return _longName == longName;
}
};
struct PositionalArgProperties {
PositionalArgProperties() : position( -1 ) {}
int position; // -1 means non-positional (floating)
bool isFixedPositional() const {
return position != -1;
}
};
template<typename ConfigT>
class CommandLine {
struct Arg : CommonArgProperties<ConfigT>, OptionArgProperties, PositionalArgProperties {
Arg() {}
Arg( Detail::BoundArgFunction<ConfigT> const& _boundField ) : CommonArgProperties<ConfigT>( _boundField ) {}
using CommonArgProperties<ConfigT>::placeholder; // !TBD
std::string dbgName() const {
if( !longName.empty() )
return "--" + longName;
if( !shortNames.empty() )
return "-" + shortNames[0];
return "positional args";
}
std::string commands() const {
std::ostringstream oss;
bool first = true;
std::vector<std::string>::const_iterator it = shortNames.begin(), itEnd = shortNames.end();
for(; it != itEnd; ++it ) {
if( first )
first = false;
else
oss << ", ";
oss << "-" << *it;
}
if( !longName.empty() ) {
if( !first )
oss << ", ";
oss << "--" << longName;
}
if( !placeholder.empty() )
oss << " <" << placeholder << ">";
return oss.str();
}
};
// NOTE: std::auto_ptr is deprecated in c++11/c++0x
#if defined(__cplusplus) && __cplusplus > 199711L
typedef std::unique_ptr<Arg> ArgAutoPtr;
#else
typedef std::auto_ptr<Arg> ArgAutoPtr;
#endif
friend void addOptName( Arg& arg, std::string const& optName )
{
if( optName.empty() )
return;
if( Detail::startsWith( optName, "--" ) ) {
if( !arg.longName.empty() )
throw std::logic_error( "Only one long opt may be specified. '"
+ arg.longName
+ "' already specified, now attempting to add '"
+ optName + "'" );
arg.longName = optName.substr( 2 );
}
else if( Detail::startsWith( optName, "-" ) )
arg.shortNames.push_back( optName.substr( 1 ) );
else
throw std::logic_error( "option must begin with - or --. Option was: '" + optName + "'" );
}
friend void setPositionalArg( Arg& arg, int position )
{
arg.position = position;
}
class ArgBuilder {
public:
ArgBuilder( Arg* arg ) : m_arg( arg ) {}
// Bind a non-boolean data member (requires placeholder string)
template<typename C, typename M>
void bind( M C::* field, std::string const& placeholder ) {
m_arg->boundField = new Detail::BoundDataMember<C,M>( field );
m_arg->placeholder = placeholder;
}
// Bind a boolean data member (no placeholder required)
template<typename C>
void bind( bool C::* field ) {
m_arg->boundField = new Detail::BoundDataMember<C,bool>( field );
}
// Bind a method taking a single, non-boolean argument (requires a placeholder string)
template<typename C, typename M>
void bind( void (C::* unaryMethod)( M ), std::string const& placeholder ) {
m_arg->boundField = new Detail::BoundUnaryMethod<C,M>( unaryMethod );
m_arg->placeholder = placeholder;
}
// Bind a method taking a single, boolean argument (no placeholder string required)
template<typename C>
void bind( void (C::* unaryMethod)( bool ) ) {
m_arg->boundField = new Detail::BoundUnaryMethod<C,bool>( unaryMethod );
}
// Bind a method that takes no arguments (will be called if opt is present)
template<typename C>
void bind( void (C::* nullaryMethod)() ) {
m_arg->boundField = new Detail::BoundNullaryMethod<C>( nullaryMethod );
}
// Bind a free function taking a single argument - the object to operate on (no placeholder string required)
template<typename C>
void bind( void (* unaryFunction)( C& ) ) {
m_arg->boundField = new Detail::BoundUnaryFunction<C>( unaryFunction );
}
// Bind a free function taking a single argument - the object to operate on (requires a placeholder string)
template<typename C, typename T>
void bind( void (* binaryFunction)( C&, T ), std::string const& placeholder ) {
m_arg->boundField = new Detail::BoundBinaryFunction<C, T>( binaryFunction );
m_arg->placeholder = placeholder;
}
ArgBuilder& describe( std::string const& description ) {
m_arg->description = description;
return *this;
}
ArgBuilder& detail( std::string const& detail ) {
m_arg->detail = detail;
return *this;
}
protected:
Arg* m_arg;
};
class OptBuilder : public ArgBuilder {
public:
OptBuilder( Arg* arg ) : ArgBuilder( arg ) {}
OptBuilder( OptBuilder& other ) : ArgBuilder( other ) {}
OptBuilder& operator[]( std::string const& optName ) {
addOptName( *ArgBuilder::m_arg, optName );
return *this;
}
};
public:
CommandLine()
: m_boundProcessName( new Detail::NullBinder<ConfigT>() ),
m_highestSpecifiedArgPosition( 0 ),
m_throwOnUnrecognisedTokens( false )
{}
CommandLine( CommandLine const& other )
: m_boundProcessName( other.m_boundProcessName ),
m_options ( other.m_options ),
m_positionalArgs( other.m_positionalArgs ),
m_highestSpecifiedArgPosition( other.m_highestSpecifiedArgPosition ),
m_throwOnUnrecognisedTokens( other.m_throwOnUnrecognisedTokens )
{
if( other.m_floatingArg.get() )
m_floatingArg = ArgAutoPtr( new Arg( *other.m_floatingArg ) );
}
CommandLine& setThrowOnUnrecognisedTokens( bool shouldThrow = true ) {
m_throwOnUnrecognisedTokens = shouldThrow;
return *this;
}
OptBuilder operator[]( std::string const& optName ) {
m_options.push_back( Arg() );
addOptName( m_options.back(), optName );
OptBuilder builder( &m_options.back() );
return builder;
}
ArgBuilder operator[]( int position ) {
m_positionalArgs.insert( std::make_pair( position, Arg() ) );
if( position > m_highestSpecifiedArgPosition )
m_highestSpecifiedArgPosition = position;
setPositionalArg( m_positionalArgs[position], position );
ArgBuilder builder( &m_positionalArgs[position] );
return builder;
}
// Invoke this with the _ instance
ArgBuilder operator[]( UnpositionalTag ) {
if( m_floatingArg.get() )
throw std::logic_error( "Only one unpositional argument can be added" );
m_floatingArg = ArgAutoPtr( new Arg() );
ArgBuilder builder( m_floatingArg.get() );
return builder;
}
template<typename C, typename M>
void bindProcessName( M C::* field ) {
m_boundProcessName = new Detail::BoundDataMember<C,M>( field );
}
template<typename C, typename M>
void bindProcessName( void (C::*_unaryMethod)( M ) ) {
m_boundProcessName = new Detail::BoundUnaryMethod<C,M>( _unaryMethod );
}
void optUsage( std::ostream& os, std::size_t indent = 0, std::size_t width = Detail::consoleWidth ) const {
typename std::vector<Arg>::const_iterator itBegin = m_options.begin(), itEnd = m_options.end(), it;
std::size_t maxWidth = 0;
for( it = itBegin; it != itEnd; ++it )
maxWidth = (std::max)( maxWidth, it->commands().size() );
for( it = itBegin; it != itEnd; ++it ) {
Detail::Text usage( it->commands(), Detail::TextAttributes()
.setWidth( maxWidth+indent )
.setIndent( indent ) );
Detail::Text desc( it->description, Detail::TextAttributes()
.setWidth( width - maxWidth - 3 ) );
for( std::size_t i = 0; i < (std::max)( usage.size(), desc.size() ); ++i ) {
std::string usageCol = i < usage.size() ? usage[i] : "";
os << usageCol;
if( i < desc.size() && !desc[i].empty() )
os << std::string( indent + 2 + maxWidth - usageCol.size(), ' ' )
<< desc[i];
os << "\n";
}
}
}
std::string optUsage() const {
std::ostringstream oss;
optUsage( oss );
return oss.str();
}
void argSynopsis( std::ostream& os ) const {
for( int i = 1; i <= m_highestSpecifiedArgPosition; ++i ) {
if( i > 1 )
os << " ";
typename std::map<int, Arg>::const_iterator it = m_positionalArgs.find( i );
if( it != m_positionalArgs.end() )
os << "<" << it->second.placeholder << ">";
else if( m_floatingArg.get() )
os << "<" << m_floatingArg->placeholder << ">";
else
throw std::logic_error( "non consecutive positional arguments with no floating args" );
}
// !TBD No indication of mandatory args
if( m_floatingArg.get() ) {
if( m_highestSpecifiedArgPosition > 1 )
os << " ";
os << "[<" << m_floatingArg->placeholder << "> ...]";
}
}
std::string argSynopsis() const {
std::ostringstream oss;
argSynopsis( oss );
return oss.str();
}
void usage( std::ostream& os, std::string const& procName ) const {
validate();
os << "usage:\n " << procName << " ";
argSynopsis( os );
if( !m_options.empty() ) {
os << " [options]\n\nwhere options are: \n";
optUsage( os, 2 );
}
os << "\n";
}
std::string usage( std::string const& procName ) const {
std::ostringstream oss;
usage( oss, procName );
return oss.str();
}
ConfigT parse( int argc, char const * const * argv ) const {
ConfigT config;
parseInto( argc, argv, config );
return config;
}
std::vector<Parser::Token> parseInto( int argc, char const * const * argv, ConfigT& config ) const {
std::string processName = argv[0];
std::size_t lastSlash = processName.find_last_of( "/\\" );
if( lastSlash != std::string::npos )
processName = processName.substr( lastSlash+1 );
m_boundProcessName.set( config, processName );
std::vector<Parser::Token> tokens;
Parser parser;
parser.parseIntoTokens( argc, argv, tokens );
return populate( tokens, config );
}
std::vector<Parser::Token> populate( std::vector<Parser::Token> const& tokens, ConfigT& config ) const {
validate();
std::vector<Parser::Token> unusedTokens = populateOptions( tokens, config );
unusedTokens = populateFixedArgs( unusedTokens, config );
unusedTokens = populateFloatingArgs( unusedTokens, config );
return unusedTokens;
}
std::vector<Parser::Token> populateOptions( std::vector<Parser::Token> const& tokens, ConfigT& config ) const {
std::vector<Parser::Token> unusedTokens;
std::vector<std::string> errors;
for( std::size_t i = 0; i < tokens.size(); ++i ) {
Parser::Token const& token = tokens[i];
typename std::vector<Arg>::const_iterator it = m_options.begin(), itEnd = m_options.end();
for(; it != itEnd; ++it ) {
Arg const& arg = *it;
try {
if( ( token.type == Parser::Token::ShortOpt && arg.hasShortName( token.data ) ) ||
( token.type == Parser::Token::LongOpt && arg.hasLongName( token.data ) ) ) {
if( arg.takesArg() ) {
if( i == tokens.size()-1 || tokens[i+1].type != Parser::Token::Positional )
errors.push_back( "Expected argument to option: " + token.data );
else
arg.boundField.set( config, tokens[++i].data );
}
else {
arg.boundField.setFlag( config );
}
break;
}
}
catch( std::exception& ex ) {
errors.push_back( std::string( ex.what() ) + "\n- while parsing: (" + arg.commands() + ")" );
}
}
if( it == itEnd ) {
if( token.type == Parser::Token::Positional || !m_throwOnUnrecognisedTokens )
unusedTokens.push_back( token );
else if( m_throwOnUnrecognisedTokens )
errors.push_back( "unrecognised option: " + token.data );
}
}
if( !errors.empty() ) {
std::ostringstream oss;
for( std::vector<std::string>::const_iterator it = errors.begin(), itEnd = errors.end();
it != itEnd;
++it ) {
if( it != errors.begin() )
oss << "\n";
oss << *it;
}
throw std::runtime_error( oss.str() );
}
return unusedTokens;
}
std::vector<Parser::Token> populateFixedArgs( std::vector<Parser::Token> const& tokens, ConfigT& config ) const {
std::vector<Parser::Token> unusedTokens;
int position = 1;
for( std::size_t i = 0; i < tokens.size(); ++i ) {
Parser::Token const& token = tokens[i];
typename std::map<int, Arg>::const_iterator it = m_positionalArgs.find( position );
if( it != m_positionalArgs.end() )
it->second.boundField.set( config, token.data );
else
unusedTokens.push_back( token );
if( token.type == Parser::Token::Positional )
position++;
}
return unusedTokens;
}
std::vector<Parser::Token> populateFloatingArgs( std::vector<Parser::Token> const& tokens, ConfigT& config ) const {
if( !m_floatingArg.get() )
return tokens;
std::vector<Parser::Token> unusedTokens;
for( std::size_t i = 0; i < tokens.size(); ++i ) {
Parser::Token const& token = tokens[i];
if( token.type == Parser::Token::Positional )
m_floatingArg->boundField.set( config, token.data );
else
unusedTokens.push_back( token );
}
return unusedTokens;
}
void validate() const
{
if( m_options.empty() && m_positionalArgs.empty() && !m_floatingArg.get() )
throw std::logic_error( "No options or arguments specified" );
for( typename std::vector<Arg>::const_iterator it = m_options.begin(),
itEnd = m_options.end();
it != itEnd; ++it )
it->validate();
}
private:
Detail::BoundArgFunction<ConfigT> m_boundProcessName;
std::vector<Arg> m_options;
std::map<int, Arg> m_positionalArgs;
ArgAutoPtr m_floatingArg;
int m_highestSpecifiedArgPosition;
bool m_throwOnUnrecognisedTokens;
};
} // end namespace Clara
STITCH_CLARA_CLOSE_NAMESPACE
#undef STITCH_CLARA_OPEN_NAMESPACE
#undef STITCH_CLARA_CLOSE_NAMESPACE
#endif // TWOBLUECUBES_CLARA_H_INCLUDED
#undef STITCH_CLARA_OPEN_NAMESPACE
// Restore Clara's value for console width, if present
#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
#define CLARA_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
#undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
#endif
#include <fstream>
namespace Catch {
inline void abortAfterFirst( ConfigData& config ) { config.abortAfter = 1; }
inline void abortAfterX( ConfigData& config, int x ) {
if( x < 1 )
throw std::runtime_error( "Value after -x or --abortAfter must be greater than zero" );
config.abortAfter = x;
}
inline void addTestOrTags( ConfigData& config, std::string const& _testSpec ) { config.testsOrTags.push_back( _testSpec ); }
inline void addWarning( ConfigData& config, std::string const& _warning ) {
if( _warning == "NoAssertions" )
config.warnings = static_cast<WarnAbout::What>( config.warnings | WarnAbout::NoAssertions );
else
throw std::runtime_error( "Unrecognised warning: '" + _warning + "'" );
}
inline void setVerbosity( ConfigData& config, int level ) {
// !TBD: accept strings?
config.verbosity = static_cast<Verbosity::Level>( level );
}
inline void setShowDurations( ConfigData& config, bool _showDurations ) {
config.showDurations = _showDurations
? ShowDurations::Always
: ShowDurations::Never;
}
inline void loadTestNamesFromFile( ConfigData& config, std::string const& _filename ) {
std::ifstream f( _filename.c_str() );
if( !f.is_open() )
throw std::domain_error( "Unable to load input file: " + _filename );
std::string line;
while( std::getline( f, line ) ) {
line = trim(line);
if( !line.empty() && !startsWith( line, "#" ) )
addTestOrTags( config, "\"" + line + "\"," );
}
}
inline Clara::CommandLine<ConfigData> makeCommandLineParser() {
using namespace Clara;
CommandLine<ConfigData> cli;
cli.bindProcessName( &ConfigData::processName );
cli["-?"]["-h"]["--help"]
.describe( "display usage information" )
.bind( &ConfigData::showHelp );
cli["-l"]["--list-tests"]
.describe( "list all/matching test cases" )
.bind( &ConfigData::listTests );
cli["-t"]["--list-tags"]
.describe( "list all/matching tags" )
.bind( &ConfigData::listTags );
cli["-s"]["--success"]
.describe( "include successful tests in output" )
.bind( &ConfigData::showSuccessfulTests );
cli["-b"]["--break"]
.describe( "break into debugger on failure" )
.bind( &ConfigData::shouldDebugBreak );
cli["-e"]["--nothrow"]
.describe( "skip exception tests" )
.bind( &ConfigData::noThrow );
cli["-i"]["--invisibles"]
.describe( "show invisibles (tabs, newlines)" )
.bind( &ConfigData::showInvisibles );
cli["-o"]["--out"]
.describe( "output filename" )
.bind( &ConfigData::outputFilename, "filename" );
cli["-r"]["--reporter"]
// .placeholder( "name[:filename]" )
.describe( "reporter to use (defaults to console)" )
.bind( &ConfigData::reporterName, "name" );
cli["-n"]["--name"]
.describe( "suite name" )
.bind( &ConfigData::name, "name" );
cli["-a"]["--abort"]
.describe( "abort at first failure" )
.bind( &abortAfterFirst );
cli["-x"]["--abortx"]
.describe( "abort after x failures" )
.bind( &abortAfterX, "no. failures" );
cli["-w"]["--warn"]
.describe( "enable warnings" )
.bind( &addWarning, "warning name" );
// - needs updating if reinstated
// cli.into( &setVerbosity )
// .describe( "level of verbosity (0=no output)" )
// .shortOpt( "v")
// .longOpt( "verbosity" )
// .placeholder( "level" );
cli[_]
.describe( "which test or tests to use" )
.bind( &addTestOrTags, "test name, pattern or tags" );
cli["-d"]["--durations"]
.describe( "show test durations" )
.bind( &setShowDurations, "yes/no" );
cli["-f"]["--input-file"]
.describe( "load test names to run from a file" )
.bind( &loadTestNamesFromFile, "filename" );
// Less common commands which don't have a short form
cli["--list-test-names-only"]
.describe( "list all/matching test cases names only" )
.bind( &ConfigData::listTestNamesOnly );
cli["--list-reporters"]
.describe( "list all reporters" )
.bind( &ConfigData::listReporters );
return cli;
}
} // end namespace Catch
// #included from: internal/catch_list.hpp
#define TWOBLUECUBES_CATCH_LIST_HPP_INCLUDED
// #included from: catch_text.h
#define TWOBLUECUBES_CATCH_TEXT_H_INCLUDED
#define TBC_TEXT_FORMAT_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH
#define CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE Catch
// #included from: ../external/tbc_text_format.h
// Only use header guard if we are not using an outer namespace
#ifndef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE
# ifdef TWOBLUECUBES_TEXT_FORMAT_H_INCLUDED
# ifndef TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED
# define TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED
# endif
# else
# define TWOBLUECUBES_TEXT_FORMAT_H_INCLUDED
# endif
#endif
#ifndef TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED
#include <string>
#include <vector>
#include <sstream>
// Use optional outer namespace
#ifdef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE
namespace CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE {
#endif
namespace Tbc {
#ifdef TBC_TEXT_FORMAT_CONSOLE_WIDTH
const unsigned int consoleWidth = TBC_TEXT_FORMAT_CONSOLE_WIDTH;
#else
const unsigned int consoleWidth = 80;
#endif
struct TextAttributes {
TextAttributes()
: initialIndent( std::string::npos ),
indent( 0 ),
width( consoleWidth-1 ),
tabChar( '\t' )
{}
TextAttributes& setInitialIndent( std::size_t _value ) { initialIndent = _value; return *this; }
TextAttributes& setIndent( std::size_t _value ) { indent = _value; return *this; }
TextAttributes& setWidth( std::size_t _value ) { width = _value; return *this; }
TextAttributes& setTabChar( char _value ) { tabChar = _value; return *this; }
std::size_t initialIndent; // indent of first line, or npos
std::size_t indent; // indent of subsequent lines, or all if initialIndent is npos
std::size_t width; // maximum width of text, including indent. Longer text will wrap
char tabChar; // If this char is seen the indent is changed to current pos
};
class Text {
public:
Text( std::string const& _str, TextAttributes const& _attr = TextAttributes() )
: attr( _attr )
{
std::string wrappableChars = " [({.,/|\\-";
std::size_t indent = _attr.initialIndent != std::string::npos
? _attr.initialIndent
: _attr.indent;
std::string remainder = _str;
while( !remainder.empty() ) {
if( lines.size() >= 1000 ) {
lines.push_back( "... message truncated due to excessive size" );
return;
}
std::size_t tabPos = std::string::npos;
std::size_t width = (std::min)( remainder.size(), _attr.width - indent );
std::size_t pos = remainder.find_first_of( '\n' );
if( pos <= width ) {
width = pos;
}
pos = remainder.find_last_of( _attr.tabChar, width );
if( pos != std::string::npos ) {
tabPos = pos;
if( remainder[width] == '\n' )
width--;
remainder = remainder.substr( 0, tabPos ) + remainder.substr( tabPos+1 );
}
if( width == remainder.size() ) {
spliceLine( indent, remainder, width );
}
else if( remainder[width] == '\n' ) {
spliceLine( indent, remainder, width );
if( width <= 1 || remainder.size() != 1 )
remainder = remainder.substr( 1 );
indent = _attr.indent;
}
else {
pos = remainder.find_last_of( wrappableChars, width );
if( pos != std::string::npos && pos > 0 ) {
spliceLine( indent, remainder, pos );
if( remainder[0] == ' ' )
remainder = remainder.substr( 1 );
}
else {
spliceLine( indent, remainder, width-1 );
lines.back() += "-";
}
if( lines.size() == 1 )
indent = _attr.indent;
if( tabPos != std::string::npos )
indent += tabPos;
}
}
}
void spliceLine( std::size_t _indent, std::string& _remainder, std::size_t _pos ) {
lines.push_back( std::string( _indent, ' ' ) + _remainder.substr( 0, _pos ) );
_remainder = _remainder.substr( _pos );
}
typedef std::vector<std::string>::const_iterator const_iterator;
const_iterator begin() const { return lines.begin(); }
const_iterator end() const { return lines.end(); }
std::string const& last() const { return lines.back(); }
std::size_t size() const { return lines.size(); }
std::string const& operator[]( std::size_t _index ) const { return lines[_index]; }
std::string toString() const {
std::ostringstream oss;
oss << *this;
return oss.str();
}
inline friend std::ostream& operator << ( std::ostream& _stream, Text const& _text ) {
for( Text::const_iterator it = _text.begin(), itEnd = _text.end();
it != itEnd; ++it ) {
if( it != _text.begin() )
_stream << "\n";
_stream << *it;
}
return _stream;
}
private:
std::string str;
TextAttributes attr;
std::vector<std::string> lines;
};
} // end namespace Tbc
#ifdef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE
} // end outer namespace
#endif
#endif // TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED
#undef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE
namespace Catch {
using Tbc::Text;
using Tbc::TextAttributes;
}
// #included from: catch_console_colour.hpp
#define TWOBLUECUBES_CATCH_CONSOLE_COLOUR_HPP_INCLUDED
namespace Catch {
namespace Detail {
struct IColourImpl;
}
struct Colour {
enum Code {
None = 0,
White,
Red,
Green,
Blue,
Cyan,
Yellow,
Grey,
Bright = 0x10,
BrightRed = Bright | Red,
BrightGreen = Bright | Green,
LightGrey = Bright | Grey,
BrightWhite = Bright | White,
// By intention
FileName = LightGrey,
Warning = Yellow,
ResultError = BrightRed,
ResultSuccess = BrightGreen,
ResultExpectedFailure = Warning,
Error = BrightRed,
Success = Green,
OriginalExpression = Cyan,
ReconstructedExpression = Yellow,
SecondaryText = LightGrey,
Headers = White
};
// Use constructed object for RAII guard
Colour( Code _colourCode );
Colour( Colour const& other );
~Colour();
// Use static method for one-shot changes
static void use( Code _colourCode );
private:
static Detail::IColourImpl* impl();
bool m_moved;
};
inline std::ostream& operator << ( std::ostream& os, Colour const& ) { return os; }
} // end namespace Catch
// #included from: catch_interfaces_reporter.h
#define TWOBLUECUBES_CATCH_INTERFACES_REPORTER_H_INCLUDED
#include <string>
#include <ostream>
#include <map>
#include <assert.h>
namespace Catch
{
struct ReporterConfig {
explicit ReporterConfig( Ptr<IConfig> const& _fullConfig )
: m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {}
ReporterConfig( Ptr<IConfig> const& _fullConfig, std::ostream& _stream )
: m_stream( &_stream ), m_fullConfig( _fullConfig ) {}
std::ostream& stream() const { return *m_stream; }
Ptr<IConfig> fullConfig() const { return m_fullConfig; }
private:
std::ostream* m_stream;
Ptr<IConfig> m_fullConfig;
};
struct ReporterPreferences {
ReporterPreferences()
: shouldRedirectStdOut( false )
{}
bool shouldRedirectStdOut;
};
template<typename T>
struct LazyStat : Option<T> {
LazyStat() : used( false ) {}
LazyStat& operator=( T const& _value ) {
Option<T>::operator=( _value );
used = false;
return *this;
}
void reset() {
Option<T>::reset();
used = false;
}
bool used;
};
struct TestRunInfo {
TestRunInfo( std::string const& _name ) : name( _name ) {}
std::string name;
};
struct GroupInfo {
GroupInfo( std::string const& _name,
std::size_t _groupIndex,
std::size_t _groupsCount )
: name( _name ),
groupIndex( _groupIndex ),
groupsCounts( _groupsCount )
{}
std::string name;
std::size_t groupIndex;
std::size_t groupsCounts;
};
struct AssertionStats {
AssertionStats( AssertionResult const& _assertionResult,
std::vector<MessageInfo> const& _infoMessages,
Totals const& _totals )
: assertionResult( _assertionResult ),
infoMessages( _infoMessages ),
totals( _totals )
{
if( assertionResult.hasMessage() ) {
// Copy message into messages list.
// !TBD This should have been done earlier, somewhere
MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() );
builder << assertionResult.getMessage();
builder.m_info.message = builder.m_stream.str();
infoMessages.push_back( builder.m_info );
}
}
virtual ~AssertionStats();
# ifdef CATCH_CPP11_OR_GREATER
AssertionStats( AssertionStats const& ) = default;
AssertionStats( AssertionStats && ) = default;
AssertionStats& operator = ( AssertionStats const& ) = default;
AssertionStats& operator = ( AssertionStats && ) = default;
# endif
AssertionResult assertionResult;
std::vector<MessageInfo> infoMessages;
Totals totals;
};
struct SectionStats {
SectionStats( SectionInfo const& _sectionInfo,
Counts const& _assertions,
double _durationInSeconds,
bool _missingAssertions )
: sectionInfo( _sectionInfo ),
assertions( _assertions ),
durationInSeconds( _durationInSeconds ),
missingAssertions( _missingAssertions )
{}
virtual ~SectionStats();
# ifdef CATCH_CPP11_OR_GREATER
SectionStats( SectionStats const& ) = default;
SectionStats( SectionStats && ) = default;
SectionStats& operator = ( SectionStats const& ) = default;
SectionStats& operator = ( SectionStats && ) = default;
# endif
SectionInfo sectionInfo;
Counts assertions;
double durationInSeconds;
bool missingAssertions;
};
struct TestCaseStats {
TestCaseStats( TestCaseInfo const& _testInfo,
Totals const& _totals,
std::string const& _stdOut,
std::string const& _stdErr,
bool _aborting )
: testInfo( _testInfo ),
totals( _totals ),
stdOut( _stdOut ),
stdErr( _stdErr ),
aborting( _aborting )
{}
virtual ~TestCaseStats();
# ifdef CATCH_CPP11_OR_GREATER
TestCaseStats( TestCaseStats const& ) = default;
TestCaseStats( TestCaseStats && ) = default;
TestCaseStats& operator = ( TestCaseStats const& ) = default;
TestCaseStats& operator = ( TestCaseStats && ) = default;
# endif
TestCaseInfo testInfo;
Totals totals;
std::string stdOut;
std::string stdErr;
bool aborting;
};
struct TestGroupStats {
TestGroupStats( GroupInfo const& _groupInfo,
Totals const& _totals,
bool _aborting )
: groupInfo( _groupInfo ),
totals( _totals ),
aborting( _aborting )
{}
TestGroupStats( GroupInfo const& _groupInfo )
: groupInfo( _groupInfo ),
aborting( false )
{}
virtual ~TestGroupStats();
# ifdef CATCH_CPP11_OR_GREATER
TestGroupStats( TestGroupStats const& ) = default;
TestGroupStats( TestGroupStats && ) = default;
TestGroupStats& operator = ( TestGroupStats const& ) = default;
TestGroupStats& operator = ( TestGroupStats && ) = default;
# endif
GroupInfo groupInfo;
Totals totals;
bool aborting;
};
struct TestRunStats {
TestRunStats( TestRunInfo const& _runInfo,
Totals const& _totals,
bool _aborting )
: runInfo( _runInfo ),
totals( _totals ),
aborting( _aborting )
{}
virtual ~TestRunStats();
# ifndef CATCH_CPP11_OR_GREATER
TestRunStats( TestRunStats const& _other )
: runInfo( _other.runInfo ),
totals( _other.totals ),
aborting( _other.aborting )
{}
# else
TestRunStats( TestRunStats const& ) = default;
TestRunStats( TestRunStats && ) = default;
TestRunStats& operator = ( TestRunStats const& ) = default;
TestRunStats& operator = ( TestRunStats && ) = default;
# endif
TestRunInfo runInfo;
Totals totals;
bool aborting;
};
struct IStreamingReporter : IShared {
virtual ~IStreamingReporter();
// Implementing class must also provide the following static method:
// static std::string getDescription();
virtual ReporterPreferences getPreferences() const = 0;
virtual void noMatchingTestCases( std::string const& spec ) = 0;
virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;
virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;
virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;
virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;
virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;
virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;
virtual void sectionEnded( SectionStats const& sectionStats ) = 0;
virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;
virtual void testRunEnded( TestRunStats const& testRunStats ) = 0;
};
struct IReporterFactory {
virtual ~IReporterFactory();
virtual IStreamingReporter* create( ReporterConfig const& config ) const = 0;
virtual std::string getDescription() const = 0;
};
struct IReporterRegistry {
typedef std::map<std::string, IReporterFactory*> FactoryMap;
virtual ~IReporterRegistry();
virtual IStreamingReporter* create( std::string const& name, Ptr<IConfig> const& config ) const = 0;
virtual FactoryMap const& getFactories() const = 0;
};
}
#include <limits>
#include <algorithm>
namespace Catch {
inline std::size_t listTests( Config const& config ) {
TestSpec testSpec = config.testSpec();
if( config.testSpec().hasFilters() )
std::cout << "Matching test cases:\n";
else {
std::cout << "All available test cases:\n";
testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec();
}
std::size_t matchedTests = 0;
TextAttributes nameAttr, tagsAttr;
nameAttr.setInitialIndent( 2 ).setIndent( 4 );
tagsAttr.setIndent( 6 );
std::vector<TestCase> matchedTestCases;
getRegistryHub().getTestCaseRegistry().getFilteredTests( testSpec, config, matchedTestCases );
for( std::vector<TestCase>::const_iterator it = matchedTestCases.begin(), itEnd = matchedTestCases.end();
it != itEnd;
++it ) {
matchedTests++;
TestCaseInfo const& testCaseInfo = it->getTestCaseInfo();
Colour::Code colour = testCaseInfo.isHidden()
? Colour::SecondaryText
: Colour::None;
Colour colourGuard( colour );
std::cout << Text( testCaseInfo.name, nameAttr ) << std::endl;
if( !testCaseInfo.tags.empty() )
std::cout << Text( testCaseInfo.tagsAsString, tagsAttr ) << std::endl;
}
if( !config.testSpec().hasFilters() )
std::cout << pluralise( matchedTests, "test case" ) << "\n" << std::endl;
else
std::cout << pluralise( matchedTests, "matching test case" ) << "\n" << std::endl;
return matchedTests;
}
inline std::size_t listTestsNamesOnly( Config const& config ) {
TestSpec testSpec = config.testSpec();
if( !config.testSpec().hasFilters() )
testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec();
std::size_t matchedTests = 0;
std::vector<TestCase> matchedTestCases;
getRegistryHub().getTestCaseRegistry().getFilteredTests( testSpec, config, matchedTestCases );
for( std::vector<TestCase>::const_iterator it = matchedTestCases.begin(), itEnd = matchedTestCases.end();
it != itEnd;
++it ) {
matchedTests++;
TestCaseInfo const& testCaseInfo = it->getTestCaseInfo();
std::cout << testCaseInfo.name << std::endl;
}
return matchedTests;
}
struct TagInfo {
TagInfo() : count ( 0 ) {}
void add( std::string const& spelling ) {
++count;
spellings.insert( spelling );
}
std::string all() const {
std::string out;
for( std::set<std::string>::const_iterator it = spellings.begin(), itEnd = spellings.end();
it != itEnd;
++it )
out += "[" + *it + "]";
return out;
}
std::set<std::string> spellings;
std::size_t count;
};
inline std::size_t listTags( Config const& config ) {
TestSpec testSpec = config.testSpec();
if( config.testSpec().hasFilters() )
std::cout << "Tags for matching test cases:\n";
else {
std::cout << "All available tags:\n";
testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec();
}
std::map<std::string, TagInfo> tagCounts;
std::vector<TestCase> matchedTestCases;
getRegistryHub().getTestCaseRegistry().getFilteredTests( testSpec, config, matchedTestCases );
for( std::vector<TestCase>::const_iterator it = matchedTestCases.begin(), itEnd = matchedTestCases.end();
it != itEnd;
++it ) {
for( std::set<std::string>::const_iterator tagIt = it->getTestCaseInfo().tags.begin(),
tagItEnd = it->getTestCaseInfo().tags.end();
tagIt != tagItEnd;
++tagIt ) {
std::string tagName = *tagIt;
std::string lcaseTagName = toLower( tagName );
std::map<std::string, TagInfo>::iterator countIt = tagCounts.find( lcaseTagName );
if( countIt == tagCounts.end() )
countIt = tagCounts.insert( std::make_pair( lcaseTagName, TagInfo() ) ).first;
countIt->second.add( tagName );
}
}
for( std::map<std::string, TagInfo>::const_iterator countIt = tagCounts.begin(),
countItEnd = tagCounts.end();
countIt != countItEnd;
++countIt ) {
std::ostringstream oss;
oss << " " << std::setw(2) << countIt->second.count << " ";
Text wrapper( countIt->second.all(), TextAttributes()
.setInitialIndent( 0 )
.setIndent( oss.str().size() )
.setWidth( CATCH_CONFIG_CONSOLE_WIDTH-10 ) );
std::cout << oss.str() << wrapper << "\n";
}
std::cout << pluralise( tagCounts.size(), "tag" ) << "\n" << std::endl;
return tagCounts.size();
}
inline std::size_t listReporters( Config const& /*config*/ ) {
std::cout << "Available reports:\n";
IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
IReporterRegistry::FactoryMap::const_iterator itBegin = factories.begin(), itEnd = factories.end(), it;
std::size_t maxNameLen = 0;
for(it = itBegin; it != itEnd; ++it )
maxNameLen = (std::max)( maxNameLen, it->first.size() );
for(it = itBegin; it != itEnd; ++it ) {
Text wrapper( it->second->getDescription(), TextAttributes()
.setInitialIndent( 0 )
.setIndent( 7+maxNameLen )
.setWidth( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 ) );
std::cout << " "
<< it->first
<< ":"
<< std::string( maxNameLen - it->first.size() + 2, ' ' )
<< wrapper << "\n";
}
std::cout << std::endl;
return factories.size();
}
inline Option<std::size_t> list( Config const& config ) {
Option<std::size_t> listedCount;
if( config.listTests() )
listedCount = listedCount.valueOr(0) + listTests( config );
if( config.listTestNamesOnly() )
listedCount = listedCount.valueOr(0) + listTestsNamesOnly( config );
if( config.listTags() )
listedCount = listedCount.valueOr(0) + listTags( config );
if( config.listReporters() )
listedCount = listedCount.valueOr(0) + listReporters( config );
return listedCount;
}
} // end namespace Catch
// #included from: internal/catch_runner_impl.hpp
#define TWOBLUECUBES_CATCH_RUNNER_IMPL_HPP_INCLUDED
// #included from: catch_test_case_tracker.hpp
#define TWOBLUECUBES_CATCH_TEST_CASE_TRACKER_HPP_INCLUDED
#include <map>
#include <string>
#include <assert.h>
namespace Catch {
namespace SectionTracking {
class TrackedSection {
typedef std::map<std::string, TrackedSection> TrackedSections;
public:
enum RunState {
NotStarted,
Executing,
ExecutingChildren,
Completed
};
TrackedSection( std::string const& name, TrackedSection* parent )
: m_name( name ), m_runState( NotStarted ), m_parent( parent )
{}
RunState runState() const { return m_runState; }
TrackedSection* findChild( std::string const& childName ) {
TrackedSections::iterator it = m_children.find( 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() {
if( m_runState == NotStarted )
m_runState = Executing;
}
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() {
return m_parent;
}
bool hasChildren() const {
return !m_children.empty();
}
private:
std::string m_name;
RunState m_runState;
TrackedSections m_children;
TrackedSection* m_parent;
};
class TestCaseTracker {
public:
TestCaseTracker( std::string const& testCaseName )
: m_testCase( testCaseName, NULL ),
m_currentSection( &m_testCase ),
m_completedASectionThisRun( false )
{}
bool enterSection( std::string const& name ) {
TrackedSection* child = m_currentSection->acquireChild( name );
if( m_completedASectionThisRun || child->runState() == TrackedSection::Completed )
return false;
m_currentSection = child;
m_currentSection->enter();
return true;
}
void leaveSection() {
m_currentSection->leave();
m_currentSection = m_currentSection->getParent();
assert( m_currentSection != NULL );
m_completedASectionThisRun = true;
}
bool currentSectionHasChildren() const {
return m_currentSection->hasChildren();
}
bool isCompleted() const {
return m_testCase.runState() == TrackedSection::Completed;
}
class Guard {
public:
Guard( TestCaseTracker& tracker ) : m_tracker( tracker ) {
m_tracker.enterTestCase();
}
~Guard() {
m_tracker.leaveTestCase();
}
private:
Guard( Guard const& );
void operator = ( Guard const& );
TestCaseTracker& m_tracker;
};
private:
void enterTestCase() {
m_currentSection = &m_testCase;
m_completedASectionThisRun = false;
m_testCase.enter();
}
void leaveTestCase() {
m_testCase.leave();
}
TrackedSection m_testCase;
TrackedSection* m_currentSection;
bool m_completedASectionThisRun;
};
} // namespace SectionTracking
using SectionTracking::TestCaseTracker;
} // namespace Catch
#include <set>
#include <string>
namespace Catch {
class StreamRedirect {
public:
StreamRedirect( std::ostream& stream, std::string& targetString )
: m_stream( stream ),
m_prevBuf( stream.rdbuf() ),
m_targetString( targetString )
{
stream.rdbuf( m_oss.rdbuf() );
}
~StreamRedirect() {
m_targetString += m_oss.str();
m_stream.rdbuf( m_prevBuf );
}
private:
std::ostream& m_stream;
std::streambuf* m_prevBuf;
std::ostringstream m_oss;
std::string& m_targetString;
};
///////////////////////////////////////////////////////////////////////////
class RunContext : public IResultCapture, public IRunner {
RunContext( RunContext const& );
void operator =( RunContext const& );
public:
explicit RunContext( Ptr<IConfig const> const& config, Ptr<IStreamingReporter> const& reporter )
: m_runInfo( config->name() ),
m_context( getCurrentMutableContext() ),
m_activeTestCase( NULL ),
m_config( config ),
m_reporter( reporter ),
m_prevRunner( m_context.getRunner() ),
m_prevResultCapture( m_context.getResultCapture() ),
m_prevConfig( m_context.getConfig() )
{
m_context.setRunner( this );
m_context.setConfig( m_config );
m_context.setResultCapture( this );
m_reporter->testRunStarting( m_runInfo );
}
virtual ~RunContext() {
m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, aborting() ) );
m_context.setRunner( m_prevRunner );
m_context.setConfig( NULL );
m_context.setResultCapture( m_prevResultCapture );
m_context.setConfig( m_prevConfig );
}
void testGroupStarting( std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount ) {
m_reporter->testGroupStarting( GroupInfo( testSpec, groupIndex, groupsCount ) );
}
void testGroupEnded( std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount ) {
m_reporter->testGroupEnded( TestGroupStats( GroupInfo( testSpec, groupIndex, groupsCount ), totals, aborting() ) );
}
Totals runTest( TestCase const& testCase ) {
Totals prevTotals = m_totals;
std::string redirectedCout;
std::string redirectedCerr;
TestCaseInfo testInfo = testCase.getTestCaseInfo();
m_reporter->testCaseStarting( testInfo );
m_activeTestCase = &testCase;
m_testCaseTracker = TestCaseTracker( testInfo.name );
do {
do {
runCurrentTest( redirectedCout, redirectedCerr );
}
while( !m_testCaseTracker->isCompleted() && !aborting() );
}
while( getCurrentContext().advanceGeneratorsForCurrentTest() && !aborting() );
Totals deltaTotals = m_totals.delta( prevTotals );
m_totals.testCases += deltaTotals.testCases;
m_reporter->testCaseEnded( TestCaseStats( testInfo,
deltaTotals,
redirectedCout,
redirectedCerr,
aborting() ) );
m_activeTestCase = NULL;
m_testCaseTracker.reset();
return deltaTotals;
}
Ptr<IConfig const> config() const {
return m_config;
}
private: // IResultCapture
virtual void assertionEnded( AssertionResult const& result ) {
if( result.getResultType() == ResultWas::Ok ) {
m_totals.assertions.passed++;
}
else if( !result.isOk() ) {
m_totals.assertions.failed++;
}
if( m_reporter->assertionEnded( AssertionStats( result, m_messages, m_totals ) ) )
m_messages.clear();
// Reset working state
m_lastAssertionInfo = AssertionInfo( "", m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition );
m_lastResult = result;
}
virtual bool sectionStarted (
SectionInfo const& sectionInfo,
Counts& assertions
)
{
std::ostringstream oss;
oss << sectionInfo.name << "@" << sectionInfo.lineInfo;
if( !m_testCaseTracker->enterSection( oss.str() ) )
return false;
m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo;
m_reporter->sectionStarting( sectionInfo );
assertions = m_totals.assertions;
return true;
}
bool testForMissingAssertions( Counts& assertions ) {
if( assertions.total() != 0 ||
!m_config->warnAboutMissingAssertions() ||
m_testCaseTracker->currentSectionHasChildren() )
return false;
m_totals.assertions.failed++;
assertions.failed++;
return true;
}
virtual void sectionEnded( SectionInfo const& info, Counts const& prevAssertions, double _durationInSeconds ) {
if( std::uncaught_exception() ) {
m_unfinishedSections.push_back( UnfinishedSections( info, prevAssertions, _durationInSeconds ) );
return;
}
Counts assertions = m_totals.assertions - prevAssertions;
bool missingAssertions = testForMissingAssertions( assertions );
m_testCaseTracker->leaveSection();
m_reporter->sectionEnded( SectionStats( info, assertions, _durationInSeconds, missingAssertions ) );
m_messages.clear();
}
virtual void pushScopedMessage( MessageInfo const& message ) {
m_messages.push_back( message );
}
virtual void popScopedMessage( MessageInfo const& message ) {
m_messages.erase( std::remove( m_messages.begin(), m_messages.end(), message ), m_messages.end() );
}
virtual std::string getCurrentTestName() const {
return m_activeTestCase
? m_activeTestCase->getTestCaseInfo().name
: "";
}
virtual const AssertionResult* getLastResult() const {
return &m_lastResult;
}
public:
// !TBD We need to do this another way!
bool aborting() const {
return m_totals.assertions.failed == static_cast<std::size_t>( m_config->abortAfter() );
}
private:
void runCurrentTest( std::string& redirectedCout, std::string& redirectedCerr ) {
TestCaseInfo const& testCaseInfo = m_activeTestCase->getTestCaseInfo();
SectionInfo testCaseSection( testCaseInfo.lineInfo, testCaseInfo.name, testCaseInfo.description );
m_reporter->sectionStarting( testCaseSection );
Counts prevAssertions = m_totals.assertions;
double duration = 0;
try {
m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, "", ResultDisposition::Normal );
TestCaseTracker::Guard guard( *m_testCaseTracker );
Timer timer;
timer.start();
if( m_reporter->getPreferences().shouldRedirectStdOut ) {
StreamRedirect coutRedir( std::cout, redirectedCout );
StreamRedirect cerrRedir( std::cerr, redirectedCerr );
m_activeTestCase->invoke();
}
else {
m_activeTestCase->invoke();
}
duration = timer.getElapsedSeconds();
}
catch( TestFailureException& ) {
// This just means the test was aborted due to failure
}
catch(...) {
ResultBuilder exResult( m_lastAssertionInfo.macroName.c_str(),
m_lastAssertionInfo.lineInfo,
m_lastAssertionInfo.capturedExpression.c_str(),
m_lastAssertionInfo.resultDisposition );
exResult.useActiveException();
}
// If sections ended prematurely due to an exception we stored their
// infos here so we can tear them down outside the unwind process.
for( std::vector<UnfinishedSections>::const_reverse_iterator it = m_unfinishedSections.rbegin(),
itEnd = m_unfinishedSections.rend();
it != itEnd;
++it )
sectionEnded( it->info, it->prevAssertions, it->durationInSeconds );
m_unfinishedSections.clear();
m_messages.clear();
Counts assertions = m_totals.assertions - prevAssertions;
bool missingAssertions = testForMissingAssertions( assertions );
if( testCaseInfo.okToFail() ) {
std::swap( assertions.failedButOk, assertions.failed );
m_totals.assertions.failed -= assertions.failedButOk;
m_totals.assertions.failedButOk += assertions.failedButOk;
}
SectionStats testCaseSectionStats( testCaseSection, assertions, duration, missingAssertions );
m_reporter->sectionEnded( testCaseSectionStats );
}
private:
struct UnfinishedSections {
UnfinishedSections( SectionInfo const& _info, Counts const& _prevAssertions, double _durationInSeconds )
: info( _info ), prevAssertions( _prevAssertions ), durationInSeconds( _durationInSeconds )
{}
SectionInfo info;
Counts prevAssertions;
double durationInSeconds;
};
TestRunInfo m_runInfo;
IMutableContext& m_context;
TestCase const* m_activeTestCase;
Option<TestCaseTracker> m_testCaseTracker;
AssertionResult m_lastResult;
Ptr<IConfig const> m_config;
Totals m_totals;
Ptr<IStreamingReporter> m_reporter;
std::vector<MessageInfo> m_messages;
IRunner* m_prevRunner;
IResultCapture* m_prevResultCapture;
Ptr<IConfig const> m_prevConfig;
AssertionInfo m_lastAssertionInfo;
std::vector<UnfinishedSections> m_unfinishedSections;
};
IResultCapture& getResultCapture() {
if( IResultCapture* capture = getCurrentContext().getResultCapture() )
return *capture;
else
throw std::logic_error( "No result capture instance" );
}
} // end namespace Catch
// #included from: internal/catch_version.h
#define TWOBLUECUBES_CATCH_VERSION_H_INCLUDED
namespace Catch {
// Versioning information
struct Version {
Version( unsigned int _majorVersion,
unsigned int _minorVersion,
unsigned int _buildNumber,
char const* const _branchName )
: majorVersion( _majorVersion ),
minorVersion( _minorVersion ),
buildNumber( _buildNumber ),
branchName( _branchName )
{}
unsigned int const majorVersion;
unsigned int const minorVersion;
unsigned int const buildNumber;
char const* const branchName;
private:
void operator=( Version const& );
};
extern Version libraryVersion;
}
#include <fstream>
#include <stdlib.h>
#include <limits>
namespace Catch {
class Runner {
public:
Runner( Ptr<Config> const& config )
: m_config( config )
{
openStream();
makeReporter();
}
Totals runTests() {
RunContext context( m_config.get(), m_reporter );
Totals totals;
context.testGroupStarting( "", 1, 1 ); // deprecated?
TestSpec testSpec = m_config->testSpec();
if( !testSpec.hasFilters() )
testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "~[.]" ).testSpec(); // All not hidden tests
std::vector<TestCase> testCases;
getRegistryHub().getTestCaseRegistry().getFilteredTests( testSpec, *m_config, testCases );
int testsRunForGroup = 0;
for( std::vector<TestCase>::const_iterator it = testCases.begin(), itEnd = testCases.end();
it != itEnd;
++it ) {
testsRunForGroup++;
if( m_testsAlreadyRun.find( *it ) == m_testsAlreadyRun.end() ) {
if( context.aborting() )
break;
totals += context.runTest( *it );
m_testsAlreadyRun.insert( *it );
}
}
context.testGroupEnded( "", totals, 1, 1 );
return totals;
}
private:
void openStream() {
// Open output file, if specified
if( !m_config->getFilename().empty() ) {
m_ofs.open( m_config->getFilename().c_str() );
if( m_ofs.fail() ) {
std::ostringstream oss;
oss << "Unable to open file: '" << m_config->getFilename() << "'";
throw std::domain_error( oss.str() );
}
m_config->setStreamBuf( m_ofs.rdbuf() );
}
}
void makeReporter() {
std::string reporterName = m_config->getReporterName().empty()
? "console"
: m_config->getReporterName();
m_reporter = getRegistryHub().getReporterRegistry().create( reporterName, m_config.get() );
if( !m_reporter ) {
std::ostringstream oss;
oss << "No reporter registered with name: '" << reporterName << "'";
throw std::domain_error( oss.str() );
}
}
private:
Ptr<Config> m_config;
std::ofstream m_ofs;
Ptr<IStreamingReporter> m_reporter;
std::set<TestCase> m_testsAlreadyRun;
};
class Session {
static bool alreadyInstantiated;
public:
struct OnUnusedOptions { enum DoWhat { Ignore, Fail }; };
Session()
: m_cli( makeCommandLineParser() ) {
if( alreadyInstantiated ) {
std::string msg = "Only one instance of Catch::Session can ever be used";
std::cerr << msg << std::endl;
throw std::logic_error( msg );
}
alreadyInstantiated = true;
}
~Session() {
Catch::cleanUp();
}
void showHelp( std::string const& processName ) {
std::cout << "\nCatch v" << libraryVersion.majorVersion << "."
<< libraryVersion.minorVersion << " build "
<< libraryVersion.buildNumber;
if( libraryVersion.branchName != std::string( "master" ) )
std::cout << " (" << libraryVersion.branchName << " branch)";
std::cout << "\n";
m_cli.usage( std::cout, processName );
std::cout << "For more detail usage please see the project docs\n" << std::endl;
}
int applyCommandLine( int argc, char* const argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
try {
m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail );
m_unusedTokens = m_cli.parseInto( argc, argv, m_configData );
if( m_configData.showHelp )
showHelp( m_configData.processName );
m_config.reset();
}
catch( std::exception& ex ) {
{
Colour colourGuard( Colour::Red );
std::cerr << "\nError(s) in input:\n"
<< Text( ex.what(), TextAttributes().setIndent(2) )
<< "\n\n";
}
m_cli.usage( std::cout, m_configData.processName );
return (std::numeric_limits<int>::max)();
}
return 0;
}
void useConfigData( ConfigData const& _configData ) {
m_configData = _configData;
m_config.reset();
}
int run( int argc, char* const argv[] ) {
int returnCode = applyCommandLine( argc, argv );
if( returnCode == 0 )
returnCode = run();
return returnCode;
}
int run() {
if( m_configData.showHelp )
return 0;
try
{
config(); // Force config to be constructed
Runner runner( m_config );
// Handle list request
if( Option<std::size_t> listed = list( config() ) )
return static_cast<int>( *listed );
return static_cast<int>( runner.runTests().assertions.failed );
}
catch( std::exception& ex ) {
std::cerr << ex.what() << std::endl;
return (std::numeric_limits<int>::max)();
}
}
Clara::CommandLine<ConfigData> const& cli() const {
return m_cli;
}
std::vector<Clara::Parser::Token> const& unusedTokens() const {
return m_unusedTokens;
}
ConfigData& configData() {
return m_configData;
}
Config& config() {
if( !m_config )
m_config = new Config( m_configData );
return *m_config;
}
private:
Clara::CommandLine<ConfigData> m_cli;
std::vector<Clara::Parser::Token> m_unusedTokens;
ConfigData m_configData;
Ptr<Config> m_config;
};
bool Session::alreadyInstantiated = false;
} // end namespace Catch
// #included from: catch_registry_hub.hpp
#define TWOBLUECUBES_CATCH_REGISTRY_HUB_HPP_INCLUDED
// #included from: catch_test_case_registry_impl.hpp
#define TWOBLUECUBES_CATCH_TEST_CASE_REGISTRY_IMPL_HPP_INCLUDED
#include <vector>
#include <set>
#include <sstream>
#include <iostream>
namespace Catch {
class TestRegistry : public ITestCaseRegistry {
public:
TestRegistry() : m_unnamedCount( 0 ) {}
virtual ~TestRegistry();
virtual void registerTest( TestCase const& testCase ) {
std::string name = testCase.getTestCaseInfo().name;
if( name == "" ) {
std::ostringstream oss;
oss << "Anonymous test case " << ++m_unnamedCount;
return registerTest( testCase.withName( oss.str() ) );
}
if( m_functions.find( testCase ) == m_functions.end() ) {
m_functions.insert( testCase );
m_functionsInOrder.push_back( testCase );
if( !testCase.isHidden() )
m_nonHiddenFunctions.push_back( testCase );
}
else {
TestCase const& prev = *m_functions.find( testCase );
{
Colour colourGuard( Colour::Red );
std::cerr << "error: TEST_CASE( \"" << name << "\" ) already defined.\n"
<< "\tFirst seen at " << prev.getTestCaseInfo().lineInfo << "\n"
<< "\tRedefined at " << testCase.getTestCaseInfo().lineInfo << std::endl;
}
exit(1);
}
}
virtual std::vector<TestCase> const& getAllTests() const {
return m_functionsInOrder;
}
virtual std::vector<TestCase> const& getAllNonHiddenTests() const {
return m_nonHiddenFunctions;
}
virtual void getFilteredTests( TestSpec const& testSpec, IConfig const& config, std::vector<TestCase>& matchingTestCases ) const {
for( std::vector<TestCase>::const_iterator it = m_functionsInOrder.begin(),
itEnd = m_functionsInOrder.end();
it != itEnd;
++it ) {
if( testSpec.matches( *it ) && ( config.allowThrows() || !it->throws() ) )
matchingTestCases.push_back( *it );
}
}
private:
std::set<TestCase> m_functions;
std::vector<TestCase> m_functionsInOrder;
std::vector<TestCase> m_nonHiddenFunctions;
size_t m_unnamedCount;
};
///////////////////////////////////////////////////////////////////////////
class FreeFunctionTestCase : public SharedImpl<ITestCase> {
public:
FreeFunctionTestCase( TestFunction fun ) : m_fun( fun ) {}
virtual void invoke() const {
m_fun();
}
private:
virtual ~FreeFunctionTestCase();
TestFunction m_fun;
};
inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) {
std::string className = classOrQualifiedMethodName;
if( startsWith( className, "&" ) )
{
std::size_t lastColons = className.rfind( "::" );
std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
if( penultimateColons == std::string::npos )
penultimateColons = 1;
className = className.substr( penultimateColons, lastColons-penultimateColons );
}
return className;
}
///////////////////////////////////////////////////////////////////////////
AutoReg::AutoReg( TestFunction function,
SourceLineInfo const& lineInfo,
NameAndDesc const& nameAndDesc ) {
registerTestCase( new FreeFunctionTestCase( function ), "", nameAndDesc, lineInfo );
}
AutoReg::~AutoReg() {}
void AutoReg::registerTestCase( ITestCase* testCase,
char const* classOrQualifiedMethodName,
NameAndDesc const& nameAndDesc,
SourceLineInfo const& lineInfo ) {
getMutableRegistryHub().registerTest
( makeTestCase( testCase,
extractClassName( classOrQualifiedMethodName ),
nameAndDesc.name,
nameAndDesc.description,
lineInfo ) );
}
} // end namespace Catch
// #included from: catch_reporter_registry.hpp
#define TWOBLUECUBES_CATCH_REPORTER_REGISTRY_HPP_INCLUDED
#include <map>
namespace Catch {
class ReporterRegistry : public IReporterRegistry {
public:
virtual ~ReporterRegistry() {
deleteAllValues( m_factories );
}
virtual IStreamingReporter* create( std::string const& name, Ptr<IConfig> const& config ) const {
FactoryMap::const_iterator it = m_factories.find( name );
if( it == m_factories.end() )
return NULL;
return it->second->create( ReporterConfig( config ) );
}
void registerReporter( std::string const& name, IReporterFactory* factory ) {
m_factories.insert( std::make_pair( name, factory ) );
}
FactoryMap const& getFactories() const {
return m_factories;
}
private:
FactoryMap m_factories;
};
}
// #included from: catch_exception_translator_registry.hpp
#define TWOBLUECUBES_CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
#ifdef __OBJC__
#import "Foundation/Foundation.h"
#endif
namespace Catch {
class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {
public:
~ExceptionTranslatorRegistry() {
deleteAll( m_translators );
}
virtual void registerTranslator( const IExceptionTranslator* translator ) {
m_translators.push_back( translator );
}
virtual std::string translateActiveException() const {
try {
#ifdef __OBJC__
// In Objective-C try objective-c exceptions first
@try {
throw;
}
@catch (NSException *exception) {
return toString( [exception description] );
}
#else
throw;
#endif
}
catch( TestFailureException& ) {
throw;
}
catch( std::exception& ex ) {
return ex.what();
}
catch( std::string& msg ) {
return msg;
gitextract_p9wjmytm/
├── .gitattributes
├── CMakeLists.txt
├── COPYING
├── README.md
├── benchmarks/
│ ├── catch.hpp
│ └── patch.cpp
├── examples/
│ ├── inpaint_image_criminisi.cpp
│ └── patch_match.cpp
├── inc/
│ └── inpaint/
│ ├── criminisi_inpainter.h
│ ├── gradient.h
│ ├── integral.h
│ ├── mean_shift.h
│ ├── patch.h
│ ├── patch_match.h
│ ├── pyramid.h
│ ├── stats.h
│ ├── template_match_candidates.h
│ └── timer.h
├── photos/
│ └── CREATIVE COMMONS.txt
├── src/
│ ├── criminisi_inpainter.cpp
│ ├── mean_shift.cpp
│ ├── patch_match.cpp
│ ├── pyramid.cpp
│ └── template_match_candidates.cpp
└── tests/
├── catch.hpp
├── criminisi_inpainter.cpp
├── gradient.cpp
├── integral.cpp
├── mean_shift.cpp
├── patch.cpp
├── patch_match.cpp
├── pyramid.cpp
├── random_testdata.h
└── template_match_candidates.cpp
Copy disabled (too large)
Download .txt
Showing preview only (15,690K chars total). Download the full file to get everything.
SYMBOL INDEX (2145 symbols across 20 files)
FILE: benchmarks/catch.hpp
type Catch (line 176) | namespace Catch {
class NonCopyable (line 178) | class NonCopyable {
method NonCopyable (line 182) | NonCopyable() {}
class SafeBool (line 186) | class SafeBool {
method type (line 190) | static type makeSafe( bool value ) {
method trueValue (line 194) | void trueValue() const {}
function deleteAll (line 198) | inline void deleteAll( ContainerT& container ) {
function deleteAllValues (line 205) | inline void deleteAllValues( AssociativeContainerT& container ) {
type pluralise (line 219) | struct pluralise {
type SourceLineInfo (line 228) | struct SourceLineInfo {
method SourceLineInfo (line 234) | SourceLineInfo( SourceLineInfo && ) = default;
method SourceLineInfo (line 235) | SourceLineInfo& operator = ( SourceLineInfo const& ) = default;
method SourceLineInfo (line 236) | SourceLineInfo& operator = ( SourceLineInfo && ) = default;
function isTrue (line 248) | inline bool isTrue( bool value ){ return value; }
function alwaysTrue (line 249) | inline bool alwaysTrue() { return true; }
function alwaysFalse (line 250) | inline bool alwaysFalse() { return false; }
type StreamEndStop (line 258) | struct StreamEndStop {
function T (line 264) | T const& operator + ( T const& value, StreamEndStop ) {
class NotImplementedException (line 276) | class NotImplementedException : public std::exception
method NotImplementedException (line 280) | NotImplementedException( NotImplementedException const& ) {}
type IGeneratorInfo (line 306) | struct IGeneratorInfo {
type IGeneratorsForTest (line 312) | struct IGeneratorsForTest {
class Ptr (line 337) | class Ptr {
method Ptr (line 339) | Ptr() : m_p( NULL ){}
method Ptr (line 340) | Ptr( T* p ) : m_p( p ){
method Ptr (line 344) | Ptr( Ptr const& other ) : m_p( other.m_p ){
method reset (line 352) | void reset() {
method Ptr (line 357) | Ptr& operator = ( T* p ){
method Ptr (line 362) | Ptr& operator = ( Ptr const& other ){
method swap (line 367) | void swap( Ptr& other ) { std::swap( m_p, other.m_p ); }
method T (line 368) | T* get() { return m_p; }
method T (line 369) | const T* get() const{ return m_p; }
method T (line 370) | T& operator*() const { return *m_p; }
method T (line 371) | T* operator->() const { return m_p; }
type IShared (line 379) | struct IShared : NonCopyable {
type SharedImpl (line 386) | struct SharedImpl : T {
method SharedImpl (line 388) | SharedImpl() : m_rc( 0 ){}
method addRef (line 390) | virtual void addRef() const {
method release (line 393) | virtual void release() const {
class TestCase (line 413) | class TestCase
class Stream (line 414) | class Stream
type IResultCapture (line 415) | struct IResultCapture
type IRunner (line 416) | struct IRunner
type IGeneratorsForTest (line 417) | struct IGeneratorsForTest
type IConfig (line 418) | struct IConfig
type IContext (line 420) | struct IContext
type IMutableContext (line 431) | struct IMutableContext : IContext
class TestSpec (line 456) | class TestSpec
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
type ITestCase (line 458) | struct ITestCase : IShared {
class TestCase (line 464) | class TestCase
type IConfig (line 465) | struct IConfig
type ITestCaseRegistry (line 467) | struct ITestCaseRegistry {
class MethodTestCase (line 478) | class MethodTestCase : public SharedImpl<ITestCase> {
method MethodTestCase (line 481) | MethodTestCase( void (C::*method)() ) : m_method( method ) {}
method invoke (line 483) | virtual void invoke() const {
type NameAndDesc (line 496) | struct NameAndDesc {
method NameAndDesc (line 497) | NameAndDesc( const char* _name = "", const char* _description= "" )
type AutoReg (line 505) | struct AutoReg {
method AutoReg (line 512) | AutoReg( void (C::*method)(),
type ResultWas (line 592) | struct ResultWas { enum OfType {
type OfType (line 592) | enum OfType {
function isOk (line 610) | inline bool isOk( ResultWas::OfType resultType ) {
function isJustInfo (line 613) | inline bool isJustInfo( int flags ) {
type ResultDisposition (line 618) | struct ResultDisposition { enum Flags {
type Flags (line 618) | enum Flags {
function shouldContinueOnFailure (line 630) | inline bool shouldContinueOnFailure( int flags ) { return ( flags &...
function isFalseTest (line 631) | inline bool isFalseTest( int flags ) { return ( flags &...
function shouldSuppressFailure (line 632) | inline bool shouldSuppressFailure( int flags ) { return ( flags &...
type AssertionInfo (line 643) | struct AssertionInfo
method AssertionInfo (line 645) | AssertionInfo() {}
type AssertionResultData (line 657) | struct AssertionResultData
method AssertionResultData (line 659) | AssertionResultData() : resultType( ResultWas::Unknown ) {}
class AssertionResult (line 666) | class AssertionResult {
method AssertionResult (line 672) | AssertionResult( AssertionResult const& ) = default;
method AssertionResult (line 673) | AssertionResult( AssertionResult && ) = default;
method AssertionResult (line 674) | AssertionResult& operator = ( AssertionResult const& ) = default;
method AssertionResult (line 675) | AssertionResult& operator = ( AssertionResult && ) = default;
type TestFailureException (line 700) | struct TestFailureException{}
class ExpressionLhs (line 702) | class ExpressionLhs
method ExpressionLhs (line 1218) | ExpressionLhs& operator = ( ExpressionLhs && ) = delete;
method ExpressionLhs (line 1222) | ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {}
method ExpressionLhs (line 1224) | ExpressionLhs( ExpressionLhs const& ) = default;
method ExpressionLhs (line 1225) | ExpressionLhs( ExpressionLhs && ) = default;
method ResultBuilder (line 1229) | ResultBuilder& operator == ( RhsT const& rhs ) {
method ResultBuilder (line 1234) | ResultBuilder& operator != ( RhsT const& rhs ) {
method ResultBuilder (line 1239) | ResultBuilder& operator < ( RhsT const& rhs ) {
method ResultBuilder (line 1244) | ResultBuilder& operator > ( RhsT const& rhs ) {
method ResultBuilder (line 1249) | ResultBuilder& operator <= ( RhsT const& rhs ) {
method ResultBuilder (line 1254) | ResultBuilder& operator >= ( RhsT const& rhs ) {
method ResultBuilder (line 1258) | ResultBuilder& operator == ( bool rhs ) {
method ResultBuilder (line 1262) | ResultBuilder& operator != ( bool rhs ) {
method endExpression (line 1266) | void endExpression() {
method ResultBuilder (line 1285) | ResultBuilder& captureExpression( RhsT const& rhs ) {
type STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison (line 704) | struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_C...
type CopyableStream (line 706) | struct CopyableStream {
method CopyableStream (line 707) | CopyableStream() {}
method CopyableStream (line 708) | CopyableStream( CopyableStream const& other ) {
method CopyableStream (line 711) | CopyableStream& operator=( CopyableStream const& other ) {
class ResultBuilder (line 719) | class ResultBuilder {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
type Internal (line 788) | namespace Internal {
type Operator (line 790) | enum Operator {
type OperatorTraits (line 799) | struct OperatorTraits { static const char* getName(){ re...
type OperatorTraits<IsEqualTo> (line 800) | struct OperatorTraits<IsEqualTo> { static const char* ge...
type OperatorTraits<IsNotEqualTo> (line 801) | struct OperatorTraits<IsNotEqualTo> { static const char* ge...
type OperatorTraits<IsLessThan> (line 802) | struct OperatorTraits<IsLessThan> { static const char* ge...
type OperatorTraits<IsGreaterThan> (line 803) | struct OperatorTraits<IsGreaterThan> { static const char* ge...
type OperatorTraits<IsLessThanOrEqualTo> (line 804) | struct OperatorTraits<IsLessThanOrEqualTo> { static const char* ge...
type OperatorTraits<IsGreaterThanOrEqualTo> (line 805) | struct OperatorTraits<IsGreaterThanOrEqualTo>{ static const char* ge...
function T (line 808) | inline T& opCast(T const& t) { return const_cast<T&>(t); }
function opCast (line 812) | inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; }
class Evaluator (line 818) | class Evaluator{}
type Evaluator<T1, T2, IsEqualTo> (line 821) | struct Evaluator<T1, T2, IsEqualTo> {
method evaluate (line 822) | static bool evaluate( T1 const& lhs, T2 const& rhs) {
type Evaluator<T1, T2, IsNotEqualTo> (line 827) | struct Evaluator<T1, T2, IsNotEqualTo> {
method evaluate (line 828) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsLessThan> (line 833) | struct Evaluator<T1, T2, IsLessThan> {
method evaluate (line 834) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsGreaterThan> (line 839) | struct Evaluator<T1, T2, IsGreaterThan> {
method evaluate (line 840) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsGreaterThanOrEqualTo> (line 845) | struct Evaluator<T1, T2, IsGreaterThanOrEqualTo> {
method evaluate (line 846) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsLessThanOrEqualTo> (line 851) | struct Evaluator<T1, T2, IsLessThanOrEqualTo> {
method evaluate (line 852) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
function applyEvaluator (line 858) | bool applyEvaluator( T1 const& lhs, T2 const& rhs ) {
function compare (line 867) | bool compare( T1 const& lhs, T2 const& rhs ) {
function compare (line 872) | bool compare( unsigned int lhs, int rhs ) {
function compare (line 875) | bool compare( unsigned long lhs, int rhs ) {
function compare (line 878) | bool compare( unsigned char lhs, int rhs ) {
function compare (line 883) | bool compare( unsigned int lhs, long rhs ) {
function compare (line 886) | bool compare( unsigned long lhs, long rhs ) {
function compare (line 889) | bool compare( unsigned char lhs, long rhs ) {
function compare (line 894) | bool compare( int lhs, unsigned int rhs ) {
function compare (line 897) | bool compare( int lhs, unsigned long rhs ) {
function compare (line 900) | bool compare( int lhs, unsigned char rhs ) {
function compare (line 905) | bool compare( long lhs, unsigned int rhs ) {
function compare (line 908) | bool compare( long lhs, unsigned long rhs ) {
function compare (line 911) | bool compare( long lhs, unsigned char rhs ) {
function compare (line 916) | bool compare( long lhs, T* rhs ) {
function compare (line 919) | bool compare( T* lhs, long rhs ) {
function compare (line 924) | bool compare( int lhs, T* rhs ) {
function compare (line 927) | bool compare( T* lhs, int rhs ) {
function compare (line 933) | bool compare( std::nullptr_t, T* rhs ) {
function compare (line 936) | bool compare( T* lhs, std::nullptr_t ) {
type TrueType (line 958) | struct TrueType {
type FalseType (line 963) | struct FalseType {
type NotABooleanExpression (line 971) | struct NotABooleanExpression
type If (line 973) | struct If : NotABooleanExpression<c> {}
type If<true> (line 974) | struct If<true> : TrueType {}
type If<false> (line 975) | struct If<false> : FalseType {}
type SizedIf (line 977) | struct SizedIf
type SizedIf<sizeof(TrueType)> (line 978) | struct SizedIf<sizeof(TrueType)> : TrueType {}
type SizedIf<sizeof(FalseType)> (line 979) | struct SizedIf<sizeof(FalseType)> : FalseType {}
type Detail (line 1038) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type StringMaker (line 1109) | struct StringMaker :
type StringMaker<T*> (line 1113) | struct StringMaker<T*> {
method convert (line 1115) | static std::string convert( U* p ) {
type StringMaker<R C::*> (line 1124) | struct StringMaker<R C::*> {
method convert (line 1125) | static std::string convert( R C::* p ) {
type Detail (line 1133) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type StringMaker<std::vector<T, Allocator> > (line 1139) | struct StringMaker<std::vector<T, Allocator> > {
method convert (line 1140) | static std::string convert( std::vector<T,Allocator> const& v ) {
type Detail (line 1145) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
function toString (line 1160) | std::string toString( T const& value ) {
type Detail (line 1192) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
class ExpressionLhs (line 1215) | class ExpressionLhs {
method ExpressionLhs (line 1218) | ExpressionLhs& operator = ( ExpressionLhs && ) = delete;
method ExpressionLhs (line 1222) | ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {}
method ExpressionLhs (line 1224) | ExpressionLhs( ExpressionLhs const& ) = default;
method ExpressionLhs (line 1225) | ExpressionLhs( ExpressionLhs && ) = default;
method ResultBuilder (line 1229) | ResultBuilder& operator == ( RhsT const& rhs ) {
method ResultBuilder (line 1234) | ResultBuilder& operator != ( RhsT const& rhs ) {
method ResultBuilder (line 1239) | ResultBuilder& operator < ( RhsT const& rhs ) {
method ResultBuilder (line 1244) | ResultBuilder& operator > ( RhsT const& rhs ) {
method ResultBuilder (line 1249) | ResultBuilder& operator <= ( RhsT const& rhs ) {
method ResultBuilder (line 1254) | ResultBuilder& operator >= ( RhsT const& rhs ) {
method ResultBuilder (line 1258) | ResultBuilder& operator == ( bool rhs ) {
method ResultBuilder (line 1262) | ResultBuilder& operator != ( bool rhs ) {
method endExpression (line 1266) | void endExpression() {
method ResultBuilder (line 1285) | ResultBuilder& captureExpression( RhsT const& rhs ) {
type MessageInfo (line 1321) | struct MessageInfo {
type MessageBuilder (line 1342) | struct MessageBuilder {
method MessageBuilder (line 1343) | MessageBuilder( std::string const& macroName,
method MessageBuilder (line 1350) | MessageBuilder& operator << ( T const& value ) {
class ScopedMessage (line 1359) | class ScopedMessage {
class TestCase (line 1377) | class TestCase
class AssertionResult (line 1378) | class AssertionResult
method AssertionResult (line 672) | AssertionResult( AssertionResult const& ) = default;
method AssertionResult (line 673) | AssertionResult( AssertionResult && ) = default;
method AssertionResult (line 674) | AssertionResult& operator = ( AssertionResult const& ) = default;
method AssertionResult (line 675) | AssertionResult& operator = ( AssertionResult && ) = default;
type AssertionInfo (line 1379) | struct AssertionInfo
method AssertionInfo (line 645) | AssertionInfo() {}
type SectionInfo (line 1380) | struct SectionInfo
type MessageInfo (line 1381) | struct MessageInfo
class ScopedMessageBuilder (line 1382) | class ScopedMessageBuilder
type Counts (line 1383) | struct Counts
method Counts (line 1617) | Counts() : passed( 0 ), failed( 0 ), failedButOk( 0 ) {}
method Counts (line 1619) | Counts operator - ( Counts const& other ) const {
method Counts (line 1626) | Counts& operator += ( Counts const& other ) {
method total (line 1633) | std::size_t total() const {
method allPassed (line 1636) | bool allPassed() const {
type IResultCapture (line 1385) | struct IResultCapture {
class TestCase (line 1456) | class TestCase
type IRunner (line 1458) | struct IRunner {
type SectionInfo (line 1596) | struct SectionInfo {
type Counts (line 1616) | struct Counts {
method Counts (line 1617) | Counts() : passed( 0 ), failed( 0 ), failedButOk( 0 ) {}
method Counts (line 1619) | Counts operator - ( Counts const& other ) const {
method Counts (line 1626) | Counts& operator += ( Counts const& other ) {
method total (line 1633) | std::size_t total() const {
method allPassed (line 1636) | bool allPassed() const {
type Totals (line 1645) | struct Totals {
method Totals (line 1647) | Totals operator - ( Totals const& other ) const {
method Totals (line 1654) | Totals delta( Totals const& prevTotals ) const {
method Totals (line 1665) | Totals& operator += ( Totals const& other ) {
class Timer (line 1687) | class Timer {
method Timer (line 1689) | Timer() : m_ticks( 0 ) {}
class Section (line 1705) | class Section {
method Section (line 1715) | Section( Section const& ) = delete;
method Section (line 1716) | Section( Section && ) = delete;
method Section (line 1717) | Section& operator = ( Section const& ) = delete;
method Section (line 1718) | Section& operator = ( Section && ) = delete;
type IGenerator (line 1752) | struct IGenerator {
class BetweenGenerator (line 1759) | class BetweenGenerator : public IGenerator<T> {
method BetweenGenerator (line 1761) | BetweenGenerator( T from, T to ) : m_from( from ), m_to( to ){}
method T (line 1763) | virtual T getValue( std::size_t index ) const {
method size (line 1767) | virtual std::size_t size() const {
class ValuesGenerator (line 1778) | class ValuesGenerator : public IGenerator<T> {
method ValuesGenerator (line 1780) | ValuesGenerator(){}
method add (line 1782) | void add( T value ) {
method T (line 1786) | virtual T getValue( std::size_t index ) const {
method size (line 1790) | virtual std::size_t size() const {
class CompositeGenerator (line 1799) | class CompositeGenerator {
method CompositeGenerator (line 1801) | CompositeGenerator() : m_totalSize( 0 ) {}
method CompositeGenerator (line 1804) | CompositeGenerator( CompositeGenerator& other )
method CompositeGenerator (line 1811) | CompositeGenerator& setFileInfo( const char* fileInfo ) {
method add (line 1838) | void add( const IGenerator<T>* generator ) {
method CompositeGenerator (line 1843) | CompositeGenerator& then( CompositeGenerator& other ) {
method CompositeGenerator (line 1848) | CompositeGenerator& then( T value ) {
method move (line 1857) | void move( CompositeGenerator& other ) {
type Generators (line 1868) | namespace Generators
function between (line 1871) | CompositeGenerator<T> between( T from, T to ) {
function values (line 1878) | CompositeGenerator<T> values( T val1, T val2 ) {
function values (line 1888) | CompositeGenerator<T> values( T val1, T val2, T val3 ){
function values (line 1899) | CompositeGenerator<T> values( T val1, T val2, T val3, T val4 ) {
class TestCase (line 1932) | class TestCase
type ITestCaseRegistry (line 1933) | struct ITestCaseRegistry
type IExceptionTranslatorRegistry (line 1934) | struct IExceptionTranslatorRegistry
type IExceptionTranslator (line 1935) | struct IExceptionTranslator
type IReporterRegistry (line 1936) | struct IReporterRegistry
type IReporterFactory (line 1937) | struct IReporterFactory
type IRegistryHub (line 1939) | struct IRegistryHub {
type IMutableRegistryHub (line 1947) | struct IMutableRegistryHub {
type IExceptionTranslator (line 1966) | struct IExceptionTranslator {
type IExceptionTranslatorRegistry (line 1971) | struct IExceptionTranslatorRegistry {
class ExceptionTranslatorRegistrar (line 1977) | class ExceptionTranslatorRegistrar {
class ExceptionTranslator (line 1979) | class ExceptionTranslator : public IExceptionTranslator {
method ExceptionTranslator (line 1982) | ExceptionTranslator( std::string(*translateFunction)( T& ) )
method translate (line 1986) | virtual std::string translate() const {
method ExceptionTranslatorRegistrar (line 2001) | ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) {
type Detail (line 2021) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type Matchers (line 2099) | namespace Matchers {
type Impl (line 2100) | namespace Impl {
type Matcher (line 2103) | struct Matcher : SharedImpl<IShared>
type MatcherImpl (line 2114) | struct MatcherImpl : Matcher<ExpressionT> {
method clone (line 2116) | virtual Ptr<Matcher<ExpressionT> > clone() const {
type Generic (line 2121) | namespace Generic {
class AllOf (line 2124) | class AllOf : public MatcherImpl<AllOf<ExpressionT>, ExpressionT> {
method AllOf (line 2127) | AllOf() {}
method AllOf (line 2128) | AllOf( AllOf const& other ) : m_matchers( other.m_matchers ) {}
method AllOf (line 2130) | AllOf& add( Matcher<ExpressionT> const& matcher ) {
method match (line 2134) | virtual bool match( ExpressionT const& expr ) const
method toString (line 2141) | virtual std::string toString() const {
class AnyOf (line 2158) | class AnyOf : public MatcherImpl<AnyOf<ExpressionT>, ExpressionT> {
method AnyOf (line 2161) | AnyOf() {}
method AnyOf (line 2162) | AnyOf( AnyOf const& other ) : m_matchers( other.m_matchers ) {}
method AnyOf (line 2164) | AnyOf& add( Matcher<ExpressionT> const& matcher ) {
method match (line 2168) | virtual bool match( ExpressionT const& expr ) const
method toString (line 2175) | virtual std::string toString() const {
type StdString (line 2193) | namespace StdString {
function makeString (line 2195) | inline std::string makeString( std::string const& str ) { return...
function makeString (line 2196) | inline std::string makeString( const char* str ) { return str ? ...
type Equals (line 2198) | struct Equals : MatcherImpl<Equals, std::string> {
method Equals (line 2199) | Equals( std::string const& str ) : m_str( str ){}
method Equals (line 2200) | Equals( Equals const& other ) : m_str( other.m_str ){}
method match (line 2204) | virtual bool match( std::string const& expr ) const {
method toString (line 2207) | virtual std::string toString() const {
type Contains (line 2214) | struct Contains : MatcherImpl<Contains, std::string> {
method Contains (line 2215) | Contains( std::string const& substr ) : m_substr( substr ){}
method Contains (line 2216) | Contains( Contains const& other ) : m_substr( other.m_substr ){}
method match (line 2220) | virtual bool match( std::string const& expr ) const {
method toString (line 2223) | virtual std::string toString() const {
type StartsWith (line 2230) | struct StartsWith : MatcherImpl<StartsWith, std::string> {
method StartsWith (line 2231) | StartsWith( std::string const& substr ) : m_substr( substr ){}
method StartsWith (line 2232) | StartsWith( StartsWith const& other ) : m_substr( other.m_subs...
method match (line 2236) | virtual bool match( std::string const& expr ) const {
method toString (line 2239) | virtual std::string toString() const {
type EndsWith (line 2246) | struct EndsWith : MatcherImpl<EndsWith, std::string> {
method EndsWith (line 2247) | EndsWith( std::string const& substr ) : m_substr( substr ){}
method EndsWith (line 2248) | EndsWith( EndsWith const& other ) : m_substr( other.m_substr ){}
method match (line 2252) | virtual bool match( std::string const& expr ) const {
method toString (line 2255) | virtual std::string toString() const {
function AllOf (line 2267) | inline Impl::Generic::AllOf<ExpressionT> AllOf( Impl::Matcher<Expres...
function AllOf (line 2272) | inline Impl::Generic::AllOf<ExpressionT> AllOf( Impl::Matcher<Expres...
function AnyOf (line 2278) | inline Impl::Generic::AnyOf<ExpressionT> AnyOf( Impl::Matcher<Expres...
function AnyOf (line 2283) | inline Impl::Generic::AnyOf<ExpressionT> AnyOf( Impl::Matcher<Expres...
function Equals (line 2289) | inline Impl::StdString::Equals Equals( std::string const& str ) {
function Equals (line 2292) | inline Impl::StdString::Equals Equals( const char* str ) {
function Contains (line 2295) | inline Impl::StdString::Contains Contains( std::string const& sub...
function Contains (line 2298) | inline Impl::StdString::Contains Contains( const char* substr ) {
function StartsWith (line 2301) | inline Impl::StdString::StartsWith StartsWith( std::string const& s...
function StartsWith (line 2304) | inline Impl::StdString::StartsWith StartsWith( const char* substr ) {
function EndsWith (line 2307) | inline Impl::StdString::EndsWith EndsWith( std::string const& sub...
function EndsWith (line 2310) | inline Impl::StdString::EndsWith EndsWith( const char* substr ) {
type TagAlias (line 2330) | struct TagAlias {
method TagAlias (line 2331) | TagAlias( std::string _tag, SourceLineInfo _lineInfo ) : tag( _tag )...
type RegistrarForTagAliases (line 2337) | struct RegistrarForTagAliases {
class Option (line 2351) | class Option {
method Option (line 2353) | Option() : nullableValue( NULL ) {}
method Option (line 2354) | Option( T const& _value )
method Option (line 2357) | Option( Option const& _other )
method Option (line 2365) | Option& operator= ( Option const& _other ) {
method Option (line 2373) | Option& operator = ( T const& _value ) {
method reset (line 2379) | void reset() {
method T (line 2385) | T& operator*() { return *nullableValue; }
method T (line 2386) | T const& operator*() const { return *nullableValue; }
method T (line 2387) | T* operator->() { return nullableValue; }
method T (line 2388) | const T* operator->() const { return nullableValue; }
method T (line 2390) | T valueOr( T const& defaultValue ) const {
method some (line 2394) | bool some() const { return nullableValue != NULL; }
method none (line 2395) | bool none() const { return nullableValue == NULL; }
type ITagAliasRegistry (line 2411) | struct ITagAliasRegistry {
type ITestCase (line 2436) | struct ITestCase
type TestCaseInfo (line 2438) | struct TestCaseInfo {
type SpecialProperties (line 2439) | enum SpecialProperties{
class TestCase (line 2470) | class TestCase : public TestCaseInfo {
class TestSpec (line 2739) | class TestSpec {
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
class TestSpecParser (line 2845) | class TestSpecParser {
type Mode (line 2846) | enum Mode{ None, Name, QuotedName, Tag }
method TestSpecParser (line 2856) | TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases...
method TestSpecParser (line 2858) | TestSpecParser& parse( std::string const& arg ) {
method TestSpec (line 2869) | TestSpec testSpec() {
method visitChar (line 2874) | void visitChar( char c ) {
method startNewMode (line 2902) | void startNewMode( Mode mode, std::size_t start ) {
method subString (line 2906) | std::string subString() const { return m_arg.substr( m_start, m_pos ...
method addPattern (line 2908) | void addPattern() {
method addFilter (line 2923) | void addFilter() {
function TestSpec (line 2930) | inline TestSpec parseTestSpec( std::string const& arg ) {
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
type Verbosity (line 2949) | struct Verbosity { enum Level {
type Level (line 2949) | enum Level {
type WarnAbout (line 2955) | struct WarnAbout { enum What {
type What (line 2955) | enum What {
type ShowDurations (line 2960) | struct ShowDurations { enum OrNot {
type OrNot (line 2960) | enum OrNot {
class TestSpec (line 2966) | class TestSpec
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
type IConfig (line 2968) | struct IConfig : IShared {
class Stream (line 2996) | class Stream {
type ConfigData (line 3020) | struct ConfigData {
method ConfigData (line 3022) | ConfigData()
class Config (line 3063) | class Config : public SharedImpl<IConfig> {
method Config (line 3070) | Config()
method Config (line 3074) | Config( ConfigData const& data )
method setFilename (line 3091) | void setFilename( std::string const& filename ) {
method listTests (line 3099) | bool listTests() const { return m_data.listTests; }
method listTestNamesOnly (line 3100) | bool listTestNamesOnly() const { return m_data.listTestNamesOnly; }
method listTags (line 3101) | bool listTags() const { return m_data.listTags; }
method listReporters (line 3102) | bool listReporters() const { return m_data.listReporters; }
method getProcessName (line 3104) | std::string getProcessName() const { return m_data.processName; }
method shouldDebugBreak (line 3106) | bool shouldDebugBreak() const { return m_data.shouldDebugBreak; }
method setStreamBuf (line 3108) | void setStreamBuf( std::streambuf* buf ) {
method useStream (line 3112) | void useStream( std::string const& streamName ) {
method getReporterName (line 3119) | std::string getReporterName() const { return m_data.reporterName; }
method abortAfter (line 3121) | int abortAfter() const { return m_data.abortAfter; }
method TestSpec (line 3123) | TestSpec const& testSpec() const { return m_testSpec; }
method showHelp (line 3125) | bool showHelp() const { return m_data.showHelp; }
method showInvisibles (line 3126) | bool showInvisibles() const { return m_data.showInvisibles; }
method allowThrows (line 3129) | virtual bool allowThrows() const { return !m_data.noThrow; }
method name (line 3131) | virtual std::string name() const { return m_data.name.empty()...
method includeSuccessfulResults (line 3132) | virtual bool includeSuccessfulResults() const { return m_data.show...
method warnAboutMissingAssertions (line 3133) | virtual bool warnAboutMissingAssertions() const { return m_data.warn...
method showDurations (line 3134) | virtual ShowDurations::OrNot showDurations() const { return m_data.s...
function abortAfterFirst (line 4018) | inline void abortAfterFirst( ConfigData& config ) { config.abortAfter ...
function abortAfterX (line 4019) | inline void abortAfterX( ConfigData& config, int x ) {
function addTestOrTags (line 4024) | inline void addTestOrTags( ConfigData& config, std::string const& _tes...
function addWarning (line 4026) | inline void addWarning( ConfigData& config, std::string const& _warnin...
function setVerbosity (line 4033) | inline void setVerbosity( ConfigData& config, int level ) {
function setShowDurations (line 4037) | inline void setShowDurations( ConfigData& config, bool _showDurations ) {
function loadTestNamesFromFile (line 4042) | inline void loadTestNamesFromFile( ConfigData& config, std::string con...
function makeCommandLineParser (line 4055) | inline Clara::CommandLine<ConfigData> makeCommandLineParser() {
type Detail (line 4316) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type Colour (line 4320) | struct Colour {
type Code (line 4321) | enum Code {
type ReporterConfig (line 4383) | struct ReporterConfig {
method ReporterConfig (line 4384) | explicit ReporterConfig( Ptr<IConfig> const& _fullConfig )
method ReporterConfig (line 4387) | ReporterConfig( Ptr<IConfig> const& _fullConfig, std::ostream& _stre...
method fullConfig (line 4391) | Ptr<IConfig> fullConfig() const { return m_fullConfig; }
type ReporterPreferences (line 4398) | struct ReporterPreferences {
method ReporterPreferences (line 4399) | ReporterPreferences()
type LazyStat (line 4407) | struct LazyStat : Option<T> {
method LazyStat (line 4408) | LazyStat() : used( false ) {}
method LazyStat (line 4409) | LazyStat& operator=( T const& _value ) {
method reset (line 4414) | void reset() {
type TestRunInfo (line 4421) | struct TestRunInfo {
method TestRunInfo (line 4422) | TestRunInfo( std::string const& _name ) : name( _name ) {}
type GroupInfo (line 4425) | struct GroupInfo {
method GroupInfo (line 4426) | GroupInfo( std::string const& _name,
type AssertionStats (line 4439) | struct AssertionStats {
method AssertionStats (line 4440) | AssertionStats( AssertionResult const& _assertionResult,
method AssertionStats (line 4460) | AssertionStats( AssertionStats const& ) = default;
method AssertionStats (line 4461) | AssertionStats( AssertionStats && ) = default;
method AssertionStats (line 4462) | AssertionStats& operator = ( AssertionStats const& ) = default;
method AssertionStats (line 4463) | AssertionStats& operator = ( AssertionStats && ) = default;
type SectionStats (line 4471) | struct SectionStats {
method SectionStats (line 4472) | SectionStats( SectionInfo const& _sectionInfo,
method SectionStats (line 4483) | SectionStats( SectionStats const& ) = default;
method SectionStats (line 4484) | SectionStats( SectionStats && ) = default;
method SectionStats (line 4485) | SectionStats& operator = ( SectionStats const& ) = default;
method SectionStats (line 4486) | SectionStats& operator = ( SectionStats && ) = default;
type TestCaseStats (line 4495) | struct TestCaseStats {
method TestCaseStats (line 4496) | TestCaseStats( TestCaseInfo const& _testInfo,
method TestCaseStats (line 4510) | TestCaseStats( TestCaseStats const& ) = default;
method TestCaseStats (line 4511) | TestCaseStats( TestCaseStats && ) = default;
method TestCaseStats (line 4512) | TestCaseStats& operator = ( TestCaseStats const& ) = default;
method TestCaseStats (line 4513) | TestCaseStats& operator = ( TestCaseStats && ) = default;
type TestGroupStats (line 4523) | struct TestGroupStats {
method TestGroupStats (line 4524) | TestGroupStats( GroupInfo const& _groupInfo,
method TestGroupStats (line 4531) | TestGroupStats( GroupInfo const& _groupInfo )
method TestGroupStats (line 4538) | TestGroupStats( TestGroupStats const& ) = default;
method TestGroupStats (line 4539) | TestGroupStats( TestGroupStats && ) = default;
method TestGroupStats (line 4540) | TestGroupStats& operator = ( TestGroupStats const& ) = default;
method TestGroupStats (line 4541) | TestGroupStats& operator = ( TestGroupStats && ) = default;
type TestRunStats (line 4549) | struct TestRunStats {
method TestRunStats (line 4550) | TestRunStats( TestRunInfo const& _runInfo,
method TestRunStats (line 4560) | TestRunStats( TestRunStats const& _other )
method TestRunStats (line 4566) | TestRunStats( TestRunStats const& ) = default;
method TestRunStats (line 4567) | TestRunStats( TestRunStats && ) = default;
method TestRunStats (line 4568) | TestRunStats& operator = ( TestRunStats const& ) = default;
method TestRunStats (line 4569) | TestRunStats& operator = ( TestRunStats && ) = default;
type IStreamingReporter (line 4577) | struct IStreamingReporter : IShared {
type IReporterFactory (line 4602) | struct IReporterFactory {
type IReporterRegistry (line 4608) | struct IReporterRegistry {
function listTests (line 4623) | inline std::size_t listTests( Config const& config ) {
function listTestsNamesOnly (line 4662) | inline std::size_t listTestsNamesOnly( Config const& config ) {
type TagInfo (line 4679) | struct TagInfo {
method TagInfo (line 4680) | TagInfo() : count ( 0 ) {}
method add (line 4681) | void add( std::string const& spelling ) {
method all (line 4685) | std::string all() const {
function listTags (line 4697) | inline std::size_t listTags( Config const& config ) {
function listReporters (line 4742) | inline std::size_t listReporters( Config const& /*config*/ ) {
function list (line 4765) | inline Option<std::size_t> list( Config const& config ) {
type SectionTracking (line 4791) | namespace SectionTracking {
class TrackedSection (line 4793) | class TrackedSection {
type RunState (line 4798) | enum RunState {
method TrackedSection (line 4805) | TrackedSection( std::string const& name, TrackedSection* parent )
method RunState (line 4809) | RunState runState() const { return m_runState; }
method TrackedSection (line 4811) | TrackedSection* findChild( std::string const& childName ) {
method TrackedSection (line 4817) | TrackedSection* acquireChild( std::string const& childName ) {
method enter (line 4823) | void enter() {
method leave (line 4827) | void leave() {
method TrackedSection (line 4837) | TrackedSection* getParent() {
method hasChildren (line 4840) | bool hasChildren() const {
class TestCaseTracker (line 4852) | class TestCaseTracker {
method TestCaseTracker (line 4854) | TestCaseTracker( std::string const& testCaseName )
method enterSection (line 4860) | bool enterSection( std::string const& name ) {
method leaveSection (line 4869) | void leaveSection() {
method currentSectionHasChildren (line 4876) | bool currentSectionHasChildren() const {
method isCompleted (line 4879) | bool isCompleted() const {
class Guard (line 4883) | class Guard {
method Guard (line 4885) | Guard( TestCaseTracker& tracker ) : m_tracker( tracker ) {
method enterTestCase (line 4898) | void enterTestCase() {
method leaveTestCase (line 4903) | void leaveTestCase() {
class StreamRedirect (line 4923) | class StreamRedirect {
method StreamRedirect (line 4926) | StreamRedirect( std::ostream& stream, std::string& targetString )
class RunContext (line 4948) | class RunContext : public IResultCapture, public IRunner {
method RunContext (line 4955) | explicit RunContext( Ptr<IConfig const> const& config, Ptr<IStreamin...
method testGroupStarting (line 4979) | void testGroupStarting( std::string const& testSpec, std::size_t gro...
method testGroupEnded (line 4982) | void testGroupEnded( std::string const& testSpec, Totals const& tota...
method Totals (line 4986) | Totals runTest( TestCase const& testCase ) {
method config (line 5021) | Ptr<IConfig const> config() const {
method assertionEnded (line 5027) | virtual void assertionEnded( AssertionResult const& result ) {
method sectionStarted (line 5043) | virtual bool sectionStarted (
method testForMissingAssertions (line 5062) | bool testForMissingAssertions( Counts& assertions ) {
method sectionEnded (line 5072) | virtual void sectionEnded( SectionInfo const& info, Counts const& pr...
method pushScopedMessage (line 5087) | virtual void pushScopedMessage( MessageInfo const& message ) {
method popScopedMessage (line 5091) | virtual void popScopedMessage( MessageInfo const& message ) {
method getCurrentTestName (line 5095) | virtual std::string getCurrentTestName() const {
method AssertionResult (line 5101) | virtual const AssertionResult* getLastResult() const {
method aborting (line 5107) | bool aborting() const {
method runCurrentTest (line 5113) | void runCurrentTest( std::string& redirectedCout, std::string& redir...
type UnfinishedSections (line 5169) | struct UnfinishedSections {
method UnfinishedSections (line 5170) | UnfinishedSections( SectionInfo const& _info, Counts const& _prevA...
function IResultCapture (line 5196) | IResultCapture& getResultCapture() {
type Version (line 5211) | struct Version {
method Version (line 5212) | Version( unsigned int _majorVersion,
class Runner (line 5240) | class Runner {
method Runner (line 5243) | Runner( Ptr<Config> const& config )
method Totals (line 5250) | Totals runTests() {
method openStream (line 5284) | void openStream() {
method makeReporter (line 5296) | void makeReporter() {
class Session (line 5316) | class Session {
type OnUnusedOptions (line 5321) | struct OnUnusedOptions { enum DoWhat { Ignore, Fail }; }
type DoWhat (line 5321) | enum DoWhat { Ignore, Fail }
method Session (line 5323) | Session()
method showHelp (line 5336) | void showHelp( std::string const& processName ) {
method applyCommandLine (line 5348) | int applyCommandLine( int argc, char* const argv[], OnUnusedOptions:...
method useConfigData (line 5369) | void useConfigData( ConfigData const& _configData ) {
method run (line 5374) | int run( int argc, char* const argv[] ) {
method run (line 5382) | int run() {
method ConfigData (line 5409) | ConfigData& configData() {
method Config (line 5412) | Config& config() {
class TestRegistry (line 5442) | class TestRegistry : public ITestCaseRegistry {
method TestRegistry (line 5444) | TestRegistry() : m_unnamedCount( 0 ) {}
method registerTest (line 5447) | virtual void registerTest( TestCase const& testCase ) {
method getFilteredTests (line 5481) | virtual void getFilteredTests( TestSpec const& testSpec, IConfig con...
class FreeFunctionTestCase (line 5501) | class FreeFunctionTestCase : public SharedImpl<ITestCase> {
method FreeFunctionTestCase (line 5504) | FreeFunctionTestCase( TestFunction fun ) : m_fun( fun ) {}
method invoke (line 5506) | virtual void invoke() const {
function extractClassName (line 5516) | inline std::string extractClassName( std::string const& classOrQualifi...
class ReporterRegistry (line 5561) | class ReporterRegistry : public IReporterRegistry {
method IStreamingReporter (line 5569) | virtual IStreamingReporter* create( std::string const& name, Ptr<ICo...
method registerReporter (line 5576) | void registerReporter( std::string const& name, IReporterFactory* fa...
method FactoryMap (line 5580) | FactoryMap const& getFactories() const {
class ExceptionTranslatorRegistry (line 5598) | class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {
method registerTranslator (line 5604) | virtual void registerTranslator( const IExceptionTranslator* transla...
method translateActiveException (line 5608) | virtual std::string translateActiveException() const {
method tryTranslators (line 5639) | std::string tryTranslators( std::vector<const IExceptionTranslator*>...
class RegistryHub (line 5660) | class RegistryHub : public IRegistryHub, public IMutableRegistryHub {
method RegistryHub (line 5666) | RegistryHub() {
method IReporterRegistry (line 5668) | virtual IReporterRegistry const& getReporterRegistry() const {
method ITestCaseRegistry (line 5671) | virtual ITestCaseRegistry const& getTestCaseRegistry() const {
method IExceptionTranslatorRegistry (line 5674) | virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry...
method registerReporter (line 5679) | virtual void registerReporter( std::string const& name, IReporterFac...
method registerTest (line 5682) | virtual void registerTest( TestCase const& testInfo ) {
method registerTranslator (line 5685) | virtual void registerTranslator( const IExceptionTranslator* transla...
function RegistryHub (line 5696) | inline RegistryHub*& getTheRegistryHub() {
method RegistryHub (line 5666) | RegistryHub() {
method IReporterRegistry (line 5668) | virtual IReporterRegistry const& getReporterRegistry() const {
method ITestCaseRegistry (line 5671) | virtual ITestCaseRegistry const& getTestCaseRegistry() const {
method IExceptionTranslatorRegistry (line 5674) | virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry...
method registerReporter (line 5679) | virtual void registerReporter( std::string const& name, IReporterFac...
method registerTest (line 5682) | virtual void registerTest( TestCase const& testInfo ) {
method registerTranslator (line 5685) | virtual void registerTranslator( const IExceptionTranslator* transla...
function IRegistryHub (line 5704) | IRegistryHub& getRegistryHub() {
function IMutableRegistryHub (line 5707) | IMutableRegistryHub& getMutableRegistryHub() {
function cleanUp (line 5710) | void cleanUp() {
function translateActiveException (line 5715) | std::string translateActiveException() {
class StreamBufBase (line 5755) | class StreamBufBase : public std::streambuf {
class StreamBufImpl (line 5767) | class StreamBufImpl : public StreamBufBase {
method StreamBufImpl (line 5772) | StreamBufImpl() {
method overflow (line 5781) | int overflow( int c ) {
method sync (line 5793) | int sync() {
type OutputDebugWriter (line 5804) | struct OutputDebugWriter {
class Context (line 5830) | class Context : public IMutableContext {
method Context (line 5832) | Context() : m_config( NULL ), m_runner( NULL ), m_resultCapture( NUL...
method IResultCapture (line 5837) | virtual IResultCapture* getResultCapture() {
method IRunner (line 5840) | virtual IRunner* getRunner() {
method getGeneratorIndex (line 5843) | virtual size_t getGeneratorIndex( std::string const& fileInfo, size_...
method advanceGeneratorsForCurrentTest (line 5848) | virtual bool advanceGeneratorsForCurrentTest() {
method getConfig (line 5853) | virtual Ptr<IConfig const> getConfig() const {
method setResultCapture (line 5858) | virtual void setResultCapture( IResultCapture* resultCapture ) {
method setRunner (line 5861) | virtual void setRunner( IRunner* runner ) {
method setConfig (line 5864) | virtual void setConfig( Ptr<IConfig const> const& config ) {
method IGeneratorsForTest (line 5871) | IGeneratorsForTest* findGeneratorsForCurrentTest() {
method IGeneratorsForTest (line 5881) | IGeneratorsForTest& getGeneratorsForCurrentTest() {
function IMutableContext (line 5901) | IMutableContext& getCurrentMutableContext() {
function IContext (line 5906) | IContext& getCurrentContext() {
function Stream (line 5910) | Stream createStream( std::string const& streamName ) {
function cleanUpContext (line 5918) | void cleanUpContext() {
type Detail (line 5927) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
class Win32ColourImpl (line 5949) | class Win32ColourImpl : public Detail::IColourImpl {
method Win32ColourImpl (line 5951) | Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) )
method use (line 5958) | virtual void use( Colour::Code _colourCode ) {
method setTextAttribute (line 5979) | void setTextAttribute( WORD _textAttribute ) {
function shouldUseColourForPlatform (line 5986) | inline bool shouldUseColourForPlatform() {
class PosixColourImpl (line 6009) | class PosixColourImpl : public Detail::IColourImpl {
method use (line 6011) | virtual void use( Colour::Code _colourCode ) {
method setColour (line 6031) | void setColour( const char* _escapeCode ) {
function shouldUseColourForPlatform (line 6036) | inline bool shouldUseColourForPlatform() {
type NoColourImpl (line 6053) | struct NoColourImpl : Detail::IColourImpl {
method use (line 6054) | void use( Colour::Code ) {}
method IColourImpl (line 6056) | static IColourImpl* instance() {
function shouldUseColour (line 6061) | static bool shouldUseColour() {
type GeneratorInfo (line 6090) | struct GeneratorInfo : IGeneratorInfo {
method GeneratorInfo (line 6092) | GeneratorInfo( std::size_t size )
method moveNext (line 6097) | bool moveNext() {
method getCurrentIndex (line 6105) | std::size_t getCurrentIndex() const {
class GeneratorsForTest (line 6115) | class GeneratorsForTest : public IGeneratorsForTest {
method IGeneratorInfo (line 6122) | IGeneratorInfo& getGeneratorInfo( std::string const& fileInfo, std::...
method moveNext (line 6133) | bool moveNext() {
function IGeneratorsForTest (line 6148) | IGeneratorsForTest* createGeneratorsForTest()
function SourceLineInfo (line 6225) | SourceLineInfo AssertionResult::getSourceInfo() const {
method SourceLineInfo (line 234) | SourceLineInfo( SourceLineInfo && ) = default;
method SourceLineInfo (line 235) | SourceLineInfo& operator = ( SourceLineInfo const& ) = default;
method SourceLineInfo (line 236) | SourceLineInfo& operator = ( SourceLineInfo && ) = default;
function parseSpecialTag (line 6240) | inline TestCaseInfo::SpecialProperties parseSpecialTag( std::string co...
function isReservedTag (line 6254) | inline bool isReservedTag( std::string const& tag ) {
function enforceNotReservedTag (line 6257) | inline void enforceNotReservedTag( std::string const& tag, SourceLineI...
function TestCase (line 6273) | TestCase makeTestCase( ITestCase* _testCase,
function TestCase (line 6370) | TestCase TestCase::withName( std::string const& _newName ) const {
function TestCase (line 6401) | TestCase& TestCase::operator = ( TestCase const& other ) {
function TestCaseInfo (line 6407) | TestCaseInfo const& TestCase::getTestCaseInfo() const
type SpecialProperties (line 2439) | enum SpecialProperties{
type IReporter (line 6467) | struct IReporter : IShared {
class LegacyReporterAdapter (line 6486) | class LegacyReporterAdapter : public SharedImpl<IStreamingReporter>
function ReporterPreferences (line 6517) | ReporterPreferences LegacyReporterAdapter::getPreferences() const {
method ReporterPreferences (line 4399) | ReporterPreferences()
function getCurrentTicks (line 6596) | uint64_t getCurrentTicks() {
function getCurrentTicks (line 6607) | uint64_t getCurrentTicks() {
function startsWith (line 6638) | bool startsWith( std::string const& s, std::string const& prefix ) {
function endsWith (line 6641) | bool endsWith( std::string const& s, std::string const& suffix ) {
function contains (line 6644) | bool contains( std::string const& s, std::string const& infix ) {
function toLowerInPlace (line 6647) | void toLowerInPlace( std::string& s ) {
function toLower (line 6650) | std::string toLower( std::string const& s ) {
function trim (line 6655) | std::string trim( std::string const& str ) {
function throwLogicError (line 6700) | void throwLogicError( std::string const& message, SourceLineInfo const...
function isDebuggerActive (line 6761) | bool isDebuggerActive(){
function isDebuggerActive (line 6797) | bool isDebuggerActive() {
function isDebuggerActive (line 6804) | bool isDebuggerActive() {
function isDebuggerActive (line 6810) | inline bool isDebuggerActive() { return false; }
function writeToDebugConsole (line 6817) | void writeToDebugConsole( std::string const& text ) {
function writeToDebugConsole (line 6823) | void writeToDebugConsole( std::string const& text ) {
type Detail (line 6835) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
function toString (line 6871) | std::string toString( std::string const& value ) {
function toString (line 6889) | std::string toString( std::wstring const& value ) {
function toString (line 6898) | std::string toString( const char* const value ) {
function toString (line 6902) | std::string toString( char* const value ) {
function toString (line 6906) | std::string toString( const wchar_t* const value )
function toString (line 6911) | std::string toString( wchar_t* const value )
function toString (line 6916) | std::string toString( int value ) {
function toString (line 6922) | std::string toString( unsigned long value ) {
function toString (line 6931) | std::string toString( unsigned int value ) {
function fpToString (line 6936) | std::string fpToString( T value, int precision ) {
function toString (line 6951) | std::string toString( const double value ) {
function toString (line 6954) | std::string toString( const float value ) {
function toString (line 6958) | std::string toString( bool value ) {
function toString (line 6962) | std::string toString( char value ) {
function toString (line 6968) | std::string toString( signed char value ) {
function toString (line 6972) | std::string toString( unsigned char value ) {
function toString (line 6977) | std::string toString( std::nullptr_t ) {
function toString (line 6983) | std::string toString( NSString const * const& nsstring ) {
function toString (line 6993) | std::string toString( NSObject* const& nsObject ) {
function ResultBuilder (line 7014) | ResultBuilder& ResultBuilder::setResultType( ResultWas::OfType result ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7018) | ResultBuilder& ResultBuilder::setResultType( bool result ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7022) | ResultBuilder& ResultBuilder::setLhs( std::string const& lhs ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7026) | ResultBuilder& ResultBuilder::setRhs( std::string const& rhs ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7030) | ResultBuilder& ResultBuilder::setOp( std::string const& op ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function AssertionResult (line 7070) | AssertionResult ResultBuilder::build() const
method AssertionResult (line 672) | AssertionResult( AssertionResult const& ) = default;
method AssertionResult (line 673) | AssertionResult( AssertionResult && ) = default;
method AssertionResult (line 674) | AssertionResult& operator = ( AssertionResult const& ) = default;
method AssertionResult (line 675) | AssertionResult& operator = ( AssertionResult && ) = default;
class TagAliasRegistry (line 7123) | class TagAliasRegistry : public ITagAliasRegistry {
function TagAliasRegistry (line 7183) | TagAliasRegistry& TagAliasRegistry::get() {
function ITagAliasRegistry (line 7190) | ITagAliasRegistry const& ITagAliasRegistry::get() { return TagAliasReg...
type StreamingReporterBase (line 7213) | struct StreamingReporterBase : SharedImpl<IStreamingReporter> {
method StreamingReporterBase (line 7215) | StreamingReporterBase( ReporterConfig const& _config )
method noMatchingTestCases (line 7222) | virtual void noMatchingTestCases( std::string const& ) {}
method testRunStarting (line 7224) | virtual void testRunStarting( TestRunInfo const& _testRunInfo ) {
method testGroupStarting (line 7227) | virtual void testGroupStarting( GroupInfo const& _groupInfo ) {
method testCaseStarting (line 7231) | virtual void testCaseStarting( TestCaseInfo const& _testInfo ) {
method sectionStarting (line 7234) | virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
method sectionEnded (line 7238) | virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) {
method testCaseEnded (line 7241) | virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats *...
method testGroupEnded (line 7245) | virtual void testGroupEnded( TestGroupStats const& /* _testGroupStat...
method testRunEnded (line 7248) | virtual void testRunEnded( TestRunStats const& /* _testRunStats */ ) {
type CumulativeReporterBase (line 7264) | struct CumulativeReporterBase : SharedImpl<IStreamingReporter> {
type Node (line 7266) | struct Node : SharedImpl<> {
method Node (line 7267) | explicit Node( T const& _value ) : value( _value ) {}
type SectionNode (line 7274) | struct SectionNode : SharedImpl<> {
method SectionNode (line 7275) | explicit SectionNode( SectionStats const& _stats ) : stats( _stats...
type BySectionInfo (line 7294) | struct BySectionInfo {
method BySectionInfo (line 7295) | BySectionInfo( SectionInfo const& other ) : m_other( other ) {}
method BySectionInfo (line 7296) | BySectionInfo( BySectionInfo const& other ) : m_other( other.m_oth...
method CumulativeReporterBase (line 7309) | CumulativeReporterBase( ReporterConfig const& _config )
method testRunStarting (line 7315) | virtual void testRunStarting( TestRunInfo const& ) {}
method testGroupStarting (line 7316) | virtual void testGroupStarting( GroupInfo const& ) {}
method testCaseStarting (line 7318) | virtual void testCaseStarting( TestCaseInfo const& ) {}
method sectionStarting (line 7320) | virtual void sectionStarting( SectionInfo const& sectionInfo ) {
method assertionStarting (line 7345) | virtual void assertionStarting( AssertionInfo const& ) {}
method assertionEnded (line 7347) | virtual bool assertionEnded( AssertionStats const& assertionStats ) {
method sectionEnded (line 7353) | virtual void sectionEnded( SectionStats const& sectionStats ) {
method testCaseEnded (line 7359) | virtual void testCaseEnded( TestCaseStats const& testCaseStats ) {
method testGroupEnded (line 7370) | virtual void testGroupEnded( TestGroupStats const& testGroupStats ) {
method testRunEnded (line 7375) | virtual void testRunEnded( TestRunStats const& testRunStats ) {
class LegacyReporterRegistrar (line 7406) | class LegacyReporterRegistrar {
class ReporterFactory (line 7408) | class ReporterFactory : public IReporterFactory {
method IStreamingReporter (line 7409) | virtual IStreamingReporter* create( ReporterConfig const& config )...
method getDescription (line 7413) | virtual std::string getDescription() const {
method LegacyReporterRegistrar (line 7420) | LegacyReporterRegistrar( std::string const& name ) {
class ReporterRegistrar (line 7426) | class ReporterRegistrar {
class ReporterFactory (line 7428) | class ReporterFactory : public IReporterFactory {
method IStreamingReporter (line 7441) | virtual IStreamingReporter* create( ReporterConfig const& config )...
method getDescription (line 7445) | virtual std::string getDescription() const {
method ReporterRegistrar (line 7452) | ReporterRegistrar( std::string const& name ) {
class XmlWriter (line 7473) | class XmlWriter {
class ScopedElement (line 7476) | class ScopedElement {
method ScopedElement (line 7478) | ScopedElement( XmlWriter* writer )
method ScopedElement (line 7482) | ScopedElement( ScopedElement const& other )
method ScopedElement (line 7492) | ScopedElement& writeText( std::string const& text, bool indent = t...
method ScopedElement (line 7498) | ScopedElement& writeAttribute( std::string const& name, T const& a...
method XmlWriter (line 7507) | XmlWriter()
method XmlWriter (line 7513) | XmlWriter( std::ostream& os )
method XmlWriter (line 7545) | XmlWriter& startElement( std::string const& name ) {
method ScopedElement (line 7555) | ScopedElement scopedElement( std::string const& name ) {
method ScopedElement (line 7478) | ScopedElement( XmlWriter* writer )
method ScopedElement (line 7482) | ScopedElement( ScopedElement const& other )
method ScopedElement (line 7492) | ScopedElement& writeText( std::string const& text, bool indent = t...
method ScopedElement (line 7498) | ScopedElement& writeAttribute( std::string const& name, T const& a...
method XmlWriter (line 7561) | XmlWriter& endElement() {
method XmlWriter (line 7575) | XmlWriter& writeAttribute( std::string const& name, std::string cons...
method XmlWriter (line 7584) | XmlWriter& writeAttribute( std::string const& name, bool attribute ) {
method XmlWriter (line 7590) | XmlWriter& writeAttribute( std::string const& name, T const& attribu...
method XmlWriter (line 7596) | XmlWriter& writeText( std::string const& text, bool indent = true ) {
method XmlWriter (line 7608) | XmlWriter& writeComment( std::string const& text ) {
method XmlWriter (line 7615) | XmlWriter& writeBlankLine() {
method setStream (line 7621) | void setStream( std::ostream& os ) {
method ensureTagClosed (line 7633) | void ensureTagClosed() {
method newlineIfNecessary (line 7640) | void newlineIfNecessary() {
method writeEncodedText (line 7647) | void writeEncodedText( std::string const& text ) {
class XmlReporter (line 7680) | class XmlReporter : public SharedImpl<IReporter> {
method XmlReporter (line 7682) | XmlReporter( ReporterConfig const& config ) : m_config( config ), m_...
method getDescription (line 7684) | static std::string getDescription() {
method shouldRedirectStdout (line 7691) | virtual bool shouldRedirectStdout() const {
method StartTesting (line 7695) | virtual void StartTesting() {
method EndTesting (line 7702) | virtual void EndTesting( const Totals& totals ) {
method StartGroup (line 7710) | virtual void StartGroup( const std::string& groupName ) {
method EndGroup (line 7715) | virtual void EndGroup( const std::string&, const Totals& totals ) {
method StartSection (line 7723) | virtual void StartSection( const std::string& sectionName, const std...
method NoAssertionsInSection (line 7730) | virtual void NoAssertionsInSection( const std::string& ) {}
method NoAssertionsInTestCase (line 7731) | virtual void NoAssertionsInTestCase( const std::string& ) {}
method EndSection (line 7733) | virtual void EndSection( const std::string& /*sectionName*/, const C...
method StartTestCase (line 7743) | virtual void StartTestCase( const Catch::TestCaseInfo& testInfo ) {
method Result (line 7748) | virtual void Result( const Catch::AssertionResult& assertionResult ) {
method Aborted (line 7798) | virtual void Aborted() {
method EndTestCase (line 7802) | virtual void EndTestCase( const Catch::TestCaseInfo&, const Totals&,...
class JunitReporter (line 7823) | class JunitReporter : public CumulativeReporterBase {
method JunitReporter (line 7825) | JunitReporter( ReporterConfig const& _config )
method getDescription (line 7832) | static std::string getDescription() {
method noMatchingTestCases (line 7836) | virtual void noMatchingTestCases( std::string const& /*spec*/ ) {}
method ReporterPreferences (line 7838) | virtual ReporterPreferences getPreferences() const {
method testRunStarting (line 7844) | virtual void testRunStarting( TestRunInfo const& runInfo ) {
method testGroupStarting (line 7849) | virtual void testGroupStarting( GroupInfo const& groupInfo ) {
method assertionEnded (line 7857) | virtual bool assertionEnded( AssertionStats const& assertionStats ) {
method testCaseEnded (line 7863) | virtual void testCaseEnded( TestCaseStats const& testCaseStats ) {
method testGroupEnded (line 7869) | virtual void testGroupEnded( TestGroupStats const& testGroupStats ) {
method testRunEndedCumulative (line 7875) | virtual void testRunEndedCumulative() {
method writeGroup (line 7879) | void writeGroup( TestGroupNode const& groupNode, double suiteTime ) {
method writeTestCase (line 7904) | void writeTestCase( TestCaseNode const& testCaseNode ) {
method writeSection (line 7921) | void writeSection( std::string const& className,
method writeAssertions (line 7960) | void writeAssertions( SectionNode const& sectionNode ) {
method writeAssertion (line 7967) | void writeAssertion( AssertionStats const& stats ) {
type ConsoleReporter (line 8035) | struct ConsoleReporter : StreamingReporterBase {
method ConsoleReporter (line 8036) | ConsoleReporter( ReporterConfig const& _config )
method getDescription (line 8042) | static std::string getDescription() {
method ReporterPreferences (line 8045) | virtual ReporterPreferences getPreferences() const {
method noMatchingTestCases (line 8051) | virtual void noMatchingTestCases( std::string const& spec ) {
method assertionStarting (line 8055) | virtual void assertionStarting( AssertionInfo const& ) {
method assertionEnded (line 8058) | virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
method sectionStarting (line 8078) | virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
method sectionEnded (line 8082) | virtual void sectionEnded( SectionStats const& _sectionStats ) {
method testCaseEnded (line 8104) | virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) {
method testGroupEnded (line 8108) | virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) {
method testRunEnded (line 8117) | virtual void testRunEnded( TestRunStats const& _testRunStats ) {
class AssertionPrinter (line 8126) | class AssertionPrinter {
method AssertionPrinter (line 8129) | AssertionPrinter( std::ostream& _stream, AssertionStats const& _st...
method print (line 8196) | void print() const {
method printResultType (line 8212) | void printResultType() const {
method printOriginalExpression (line 8218) | void printOriginalExpression() const {
method printReconstructedExpression (line 8226) | void printReconstructedExpression() const {
method printMessage (line 8233) | void printMessage() const {
method printSourceInfo (line 8244) | void printSourceInfo() const {
method lazyPrint (line 8260) | void lazyPrint() {
method lazyPrintRunInfo (line 8272) | void lazyPrintRunInfo() {
method lazyPrintGroupInfo (line 8286) | void lazyPrintGroupInfo() {
method printTestCaseAndSectionHeader (line 8292) | void printTestCaseAndSectionHeader() {
method printClosedHeader (line 8316) | void printClosedHeader( std::string const& _name ) {
method printOpenHeader (line 8320) | void printOpenHeader( std::string const& _name ) {
method printHeaderString (line 8330) | void printHeaderString( std::string const& _string, std::size_t inde...
type SummaryColumn (line 8341) | struct SummaryColumn {
method SummaryColumn (line 8343) | SummaryColumn( std::string const& _label, Colour::Code _colour )
method SummaryColumn (line 8347) | SummaryColumn addRow( std::size_t count ) {
method printTotals (line 8367) | void printTotals( Totals const& totals ) {
method printSummaryRow (line 8398) | void printSummaryRow( std::string const& label, std::vector<SummaryC...
method makeRatio (line 8417) | static std::size_t makeRatio( std::size_t number, std::size_t total ) {
method printTotalsDivider (line 8430) | void printTotalsDivider( Totals const& totals ) {
method printSummaryDivider (line 8452) | void printSummaryDivider() {
type CompactReporter (line 8478) | struct CompactReporter : StreamingReporterBase {
method CompactReporter (line 8480) | CompactReporter( ReporterConfig const& _config )
method getDescription (line 8486) | static std::string getDescription() {
method ReporterPreferences (line 8490) | virtual ReporterPreferences getPreferences() const {
method noMatchingTestCases (line 8496) | virtual void noMatchingTestCases( std::string const& spec ) {
method assertionStarting (line 8500) | virtual void assertionStarting( AssertionInfo const& ) {
method assertionEnded (line 8503) | virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
method testRunEnded (line 8522) | virtual void testRunEnded( TestRunStats const& _testRunStats ) {
class AssertionPrinter (line 8529) | class AssertionPrinter {
method AssertionPrinter (line 8532) | AssertionPrinter( std::ostream& _stream, AssertionStats const& _st...
method print (line 8541) | void print() {
method dimColour (line 8605) | static Colour::Code dimColour() { return Colour::FileName; }
method printSourceInfo (line 8615) | void printSourceInfo() const {
method printResultType (line 8620) | void printResultType( Colour::Code colour, std::string passOrFail ...
method printIssue (line 8630) | void printIssue( std::string issue ) const {
method printExpressionWas (line 8634) | void printExpressionWas() {
method printOriginalExpression (line 8645) | void printOriginalExpression() const {
method printReconstructedExpression (line 8651) | void printReconstructedExpression() const {
method printMessage (line 8661) | void printMessage() {
method printRemainingMessages (line 8668) | void printRemainingMessages( Colour::Code colour = dimColour() ) {
method bothOrAll (line 8709) | std::string bothOrAll( std::size_t count ) const {
method printTotals (line 8713) | void printTotals( const Totals& totals ) const {
type Catch (line 274) | namespace Catch {
class NonCopyable (line 178) | class NonCopyable {
method NonCopyable (line 182) | NonCopyable() {}
class SafeBool (line 186) | class SafeBool {
method type (line 190) | static type makeSafe( bool value ) {
method trueValue (line 194) | void trueValue() const {}
function deleteAll (line 198) | inline void deleteAll( ContainerT& container ) {
function deleteAllValues (line 205) | inline void deleteAllValues( AssociativeContainerT& container ) {
type pluralise (line 219) | struct pluralise {
type SourceLineInfo (line 228) | struct SourceLineInfo {
method SourceLineInfo (line 234) | SourceLineInfo( SourceLineInfo && ) = default;
method SourceLineInfo (line 235) | SourceLineInfo& operator = ( SourceLineInfo const& ) = default;
method SourceLineInfo (line 236) | SourceLineInfo& operator = ( SourceLineInfo && ) = default;
function isTrue (line 248) | inline bool isTrue( bool value ){ return value; }
function alwaysTrue (line 249) | inline bool alwaysTrue() { return true; }
function alwaysFalse (line 250) | inline bool alwaysFalse() { return false; }
type StreamEndStop (line 258) | struct StreamEndStop {
function T (line 264) | T const& operator + ( T const& value, StreamEndStop ) {
class NotImplementedException (line 276) | class NotImplementedException : public std::exception
method NotImplementedException (line 280) | NotImplementedException( NotImplementedException const& ) {}
type IGeneratorInfo (line 306) | struct IGeneratorInfo {
type IGeneratorsForTest (line 312) | struct IGeneratorsForTest {
class Ptr (line 337) | class Ptr {
method Ptr (line 339) | Ptr() : m_p( NULL ){}
method Ptr (line 340) | Ptr( T* p ) : m_p( p ){
method Ptr (line 344) | Ptr( Ptr const& other ) : m_p( other.m_p ){
method reset (line 352) | void reset() {
method Ptr (line 357) | Ptr& operator = ( T* p ){
method Ptr (line 362) | Ptr& operator = ( Ptr const& other ){
method swap (line 367) | void swap( Ptr& other ) { std::swap( m_p, other.m_p ); }
method T (line 368) | T* get() { return m_p; }
method T (line 369) | const T* get() const{ return m_p; }
method T (line 370) | T& operator*() const { return *m_p; }
method T (line 371) | T* operator->() const { return m_p; }
type IShared (line 379) | struct IShared : NonCopyable {
type SharedImpl (line 386) | struct SharedImpl : T {
method SharedImpl (line 388) | SharedImpl() : m_rc( 0 ){}
method addRef (line 390) | virtual void addRef() const {
method release (line 393) | virtual void release() const {
class TestCase (line 413) | class TestCase
class Stream (line 414) | class Stream
type IResultCapture (line 415) | struct IResultCapture
type IRunner (line 416) | struct IRunner
type IGeneratorsForTest (line 417) | struct IGeneratorsForTest
type IConfig (line 418) | struct IConfig
type IContext (line 420) | struct IContext
type IMutableContext (line 431) | struct IMutableContext : IContext
class TestSpec (line 456) | class TestSpec
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
type ITestCase (line 458) | struct ITestCase : IShared {
class TestCase (line 464) | class TestCase
type IConfig (line 465) | struct IConfig
type ITestCaseRegistry (line 467) | struct ITestCaseRegistry {
class MethodTestCase (line 478) | class MethodTestCase : public SharedImpl<ITestCase> {
method MethodTestCase (line 481) | MethodTestCase( void (C::*method)() ) : m_method( method ) {}
method invoke (line 483) | virtual void invoke() const {
type NameAndDesc (line 496) | struct NameAndDesc {
method NameAndDesc (line 497) | NameAndDesc( const char* _name = "", const char* _description= "" )
type AutoReg (line 505) | struct AutoReg {
method AutoReg (line 512) | AutoReg( void (C::*method)(),
type ResultWas (line 592) | struct ResultWas { enum OfType {
type OfType (line 592) | enum OfType {
function isOk (line 610) | inline bool isOk( ResultWas::OfType resultType ) {
function isJustInfo (line 613) | inline bool isJustInfo( int flags ) {
type ResultDisposition (line 618) | struct ResultDisposition { enum Flags {
type Flags (line 618) | enum Flags {
function shouldContinueOnFailure (line 630) | inline bool shouldContinueOnFailure( int flags ) { return ( flags &...
function isFalseTest (line 631) | inline bool isFalseTest( int flags ) { return ( flags &...
function shouldSuppressFailure (line 632) | inline bool shouldSuppressFailure( int flags ) { return ( flags &...
type AssertionInfo (line 643) | struct AssertionInfo
method AssertionInfo (line 645) | AssertionInfo() {}
type AssertionResultData (line 657) | struct AssertionResultData
method AssertionResultData (line 659) | AssertionResultData() : resultType( ResultWas::Unknown ) {}
class AssertionResult (line 666) | class AssertionResult {
method AssertionResult (line 672) | AssertionResult( AssertionResult const& ) = default;
method AssertionResult (line 673) | AssertionResult( AssertionResult && ) = default;
method AssertionResult (line 674) | AssertionResult& operator = ( AssertionResult const& ) = default;
method AssertionResult (line 675) | AssertionResult& operator = ( AssertionResult && ) = default;
type TestFailureException (line 700) | struct TestFailureException{}
class ExpressionLhs (line 702) | class ExpressionLhs
method ExpressionLhs (line 1218) | ExpressionLhs& operator = ( ExpressionLhs && ) = delete;
method ExpressionLhs (line 1222) | ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {}
method ExpressionLhs (line 1224) | ExpressionLhs( ExpressionLhs const& ) = default;
method ExpressionLhs (line 1225) | ExpressionLhs( ExpressionLhs && ) = default;
method ResultBuilder (line 1229) | ResultBuilder& operator == ( RhsT const& rhs ) {
method ResultBuilder (line 1234) | ResultBuilder& operator != ( RhsT const& rhs ) {
method ResultBuilder (line 1239) | ResultBuilder& operator < ( RhsT const& rhs ) {
method ResultBuilder (line 1244) | ResultBuilder& operator > ( RhsT const& rhs ) {
method ResultBuilder (line 1249) | ResultBuilder& operator <= ( RhsT const& rhs ) {
method ResultBuilder (line 1254) | ResultBuilder& operator >= ( RhsT const& rhs ) {
method ResultBuilder (line 1258) | ResultBuilder& operator == ( bool rhs ) {
method ResultBuilder (line 1262) | ResultBuilder& operator != ( bool rhs ) {
method endExpression (line 1266) | void endExpression() {
method ResultBuilder (line 1285) | ResultBuilder& captureExpression( RhsT const& rhs ) {
type STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison (line 704) | struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_C...
type CopyableStream (line 706) | struct CopyableStream {
method CopyableStream (line 707) | CopyableStream() {}
method CopyableStream (line 708) | CopyableStream( CopyableStream const& other ) {
method CopyableStream (line 711) | CopyableStream& operator=( CopyableStream const& other ) {
class ResultBuilder (line 719) | class ResultBuilder {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
type Internal (line 788) | namespace Internal {
type Operator (line 790) | enum Operator {
type OperatorTraits (line 799) | struct OperatorTraits { static const char* getName(){ re...
type OperatorTraits<IsEqualTo> (line 800) | struct OperatorTraits<IsEqualTo> { static const char* ge...
type OperatorTraits<IsNotEqualTo> (line 801) | struct OperatorTraits<IsNotEqualTo> { static const char* ge...
type OperatorTraits<IsLessThan> (line 802) | struct OperatorTraits<IsLessThan> { static const char* ge...
type OperatorTraits<IsGreaterThan> (line 803) | struct OperatorTraits<IsGreaterThan> { static const char* ge...
type OperatorTraits<IsLessThanOrEqualTo> (line 804) | struct OperatorTraits<IsLessThanOrEqualTo> { static const char* ge...
type OperatorTraits<IsGreaterThanOrEqualTo> (line 805) | struct OperatorTraits<IsGreaterThanOrEqualTo>{ static const char* ge...
function T (line 808) | inline T& opCast(T const& t) { return const_cast<T&>(t); }
function opCast (line 812) | inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; }
class Evaluator (line 818) | class Evaluator{}
type Evaluator<T1, T2, IsEqualTo> (line 821) | struct Evaluator<T1, T2, IsEqualTo> {
method evaluate (line 822) | static bool evaluate( T1 const& lhs, T2 const& rhs) {
type Evaluator<T1, T2, IsNotEqualTo> (line 827) | struct Evaluator<T1, T2, IsNotEqualTo> {
method evaluate (line 828) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsLessThan> (line 833) | struct Evaluator<T1, T2, IsLessThan> {
method evaluate (line 834) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsGreaterThan> (line 839) | struct Evaluator<T1, T2, IsGreaterThan> {
method evaluate (line 840) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsGreaterThanOrEqualTo> (line 845) | struct Evaluator<T1, T2, IsGreaterThanOrEqualTo> {
method evaluate (line 846) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsLessThanOrEqualTo> (line 851) | struct Evaluator<T1, T2, IsLessThanOrEqualTo> {
method evaluate (line 852) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
function applyEvaluator (line 858) | bool applyEvaluator( T1 const& lhs, T2 const& rhs ) {
function compare (line 867) | bool compare( T1 const& lhs, T2 const& rhs ) {
function compare (line 872) | bool compare( unsigned int lhs, int rhs ) {
function compare (line 875) | bool compare( unsigned long lhs, int rhs ) {
function compare (line 878) | bool compare( unsigned char lhs, int rhs ) {
function compare (line 883) | bool compare( unsigned int lhs, long rhs ) {
function compare (line 886) | bool compare( unsigned long lhs, long rhs ) {
function compare (line 889) | bool compare( unsigned char lhs, long rhs ) {
function compare (line 894) | bool compare( int lhs, unsigned int rhs ) {
function compare (line 897) | bool compare( int lhs, unsigned long rhs ) {
function compare (line 900) | bool compare( int lhs, unsigned char rhs ) {
function compare (line 905) | bool compare( long lhs, unsigned int rhs ) {
function compare (line 908) | bool compare( long lhs, unsigned long rhs ) {
function compare (line 911) | bool compare( long lhs, unsigned char rhs ) {
function compare (line 916) | bool compare( long lhs, T* rhs ) {
function compare (line 919) | bool compare( T* lhs, long rhs ) {
function compare (line 924) | bool compare( int lhs, T* rhs ) {
function compare (line 927) | bool compare( T* lhs, int rhs ) {
function compare (line 933) | bool compare( std::nullptr_t, T* rhs ) {
function compare (line 936) | bool compare( T* lhs, std::nullptr_t ) {
type TrueType (line 958) | struct TrueType {
type FalseType (line 963) | struct FalseType {
type NotABooleanExpression (line 971) | struct NotABooleanExpression
type If (line 973) | struct If : NotABooleanExpression<c> {}
type If<true> (line 974) | struct If<true> : TrueType {}
type If<false> (line 975) | struct If<false> : FalseType {}
type SizedIf (line 977) | struct SizedIf
type SizedIf<sizeof(TrueType)> (line 978) | struct SizedIf<sizeof(TrueType)> : TrueType {}
type SizedIf<sizeof(FalseType)> (line 979) | struct SizedIf<sizeof(FalseType)> : FalseType {}
type Detail (line 1038) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type StringMaker (line 1109) | struct StringMaker :
type StringMaker<T*> (line 1113) | struct StringMaker<T*> {
method convert (line 1115) | static std::string convert( U* p ) {
type StringMaker<R C::*> (line 1124) | struct StringMaker<R C::*> {
method convert (line 1125) | static std::string convert( R C::* p ) {
type Detail (line 1133) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type StringMaker<std::vector<T, Allocator> > (line 1139) | struct StringMaker<std::vector<T, Allocator> > {
method convert (line 1140) | static std::string convert( std::vector<T,Allocator> const& v ) {
type Detail (line 1145) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
function toString (line 1160) | std::string toString( T const& value ) {
type Detail (line 1192) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
class ExpressionLhs (line 1215) | class ExpressionLhs {
method ExpressionLhs (line 1218) | ExpressionLhs& operator = ( ExpressionLhs && ) = delete;
method ExpressionLhs (line 1222) | ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {}
method ExpressionLhs (line 1224) | ExpressionLhs( ExpressionLhs const& ) = default;
method ExpressionLhs (line 1225) | ExpressionLhs( ExpressionLhs && ) = default;
method ResultBuilder (line 1229) | ResultBuilder& operator == ( RhsT const& rhs ) {
method ResultBuilder (line 1234) | ResultBuilder& operator != ( RhsT const& rhs ) {
method ResultBuilder (line 1239) | ResultBuilder& operator < ( RhsT const& rhs ) {
method ResultBuilder (line 1244) | ResultBuilder& operator > ( RhsT const& rhs ) {
method ResultBuilder (line 1249) | ResultBuilder& operator <= ( RhsT const& rhs ) {
method ResultBuilder (line 1254) | ResultBuilder& operator >= ( RhsT const& rhs ) {
method ResultBuilder (line 1258) | ResultBuilder& operator == ( bool rhs ) {
method ResultBuilder (line 1262) | ResultBuilder& operator != ( bool rhs ) {
method endExpression (line 1266) | void endExpression() {
method ResultBuilder (line 1285) | ResultBuilder& captureExpression( RhsT const& rhs ) {
type MessageInfo (line 1321) | struct MessageInfo {
type MessageBuilder (line 1342) | struct MessageBuilder {
method MessageBuilder (line 1343) | MessageBuilder( std::string const& macroName,
method MessageBuilder (line 1350) | MessageBuilder& operator << ( T const& value ) {
class ScopedMessage (line 1359) | class ScopedMessage {
class TestCase (line 1377) | class TestCase
class AssertionResult (line 1378) | class AssertionResult
method AssertionResult (line 672) | AssertionResult( AssertionResult const& ) = default;
method AssertionResult (line 673) | AssertionResult( AssertionResult && ) = default;
method AssertionResult (line 674) | AssertionResult& operator = ( AssertionResult const& ) = default;
method AssertionResult (line 675) | AssertionResult& operator = ( AssertionResult && ) = default;
type AssertionInfo (line 1379) | struct AssertionInfo
method AssertionInfo (line 645) | AssertionInfo() {}
type SectionInfo (line 1380) | struct SectionInfo
type MessageInfo (line 1381) | struct MessageInfo
class ScopedMessageBuilder (line 1382) | class ScopedMessageBuilder
type Counts (line 1383) | struct Counts
method Counts (line 1617) | Counts() : passed( 0 ), failed( 0 ), failedButOk( 0 ) {}
method Counts (line 1619) | Counts operator - ( Counts const& other ) const {
method Counts (line 1626) | Counts& operator += ( Counts const& other ) {
method total (line 1633) | std::size_t total() const {
method allPassed (line 1636) | bool allPassed() const {
type IResultCapture (line 1385) | struct IResultCapture {
class TestCase (line 1456) | class TestCase
type IRunner (line 1458) | struct IRunner {
type SectionInfo (line 1596) | struct SectionInfo {
type Counts (line 1616) | struct Counts {
method Counts (line 1617) | Counts() : passed( 0 ), failed( 0 ), failedButOk( 0 ) {}
method Counts (line 1619) | Counts operator - ( Counts const& other ) const {
method Counts (line 1626) | Counts& operator += ( Counts const& other ) {
method total (line 1633) | std::size_t total() const {
method allPassed (line 1636) | bool allPassed() const {
type Totals (line 1645) | struct Totals {
method Totals (line 1647) | Totals operator - ( Totals const& other ) const {
method Totals (line 1654) | Totals delta( Totals const& prevTotals ) const {
method Totals (line 1665) | Totals& operator += ( Totals const& other ) {
class Timer (line 1687) | class Timer {
method Timer (line 1689) | Timer() : m_ticks( 0 ) {}
class Section (line 1705) | class Section {
method Section (line 1715) | Section( Section const& ) = delete;
method Section (line 1716) | Section( Section && ) = delete;
method Section (line 1717) | Section& operator = ( Section const& ) = delete;
method Section (line 1718) | Section& operator = ( Section && ) = delete;
type IGenerator (line 1752) | struct IGenerator {
class BetweenGenerator (line 1759) | class BetweenGenerator : public IGenerator<T> {
method BetweenGenerator (line 1761) | BetweenGenerator( T from, T to ) : m_from( from ), m_to( to ){}
method T (line 1763) | virtual T getValue( std::size_t index ) const {
method size (line 1767) | virtual std::size_t size() const {
class ValuesGenerator (line 1778) | class ValuesGenerator : public IGenerator<T> {
method ValuesGenerator (line 1780) | ValuesGenerator(){}
method add (line 1782) | void add( T value ) {
method T (line 1786) | virtual T getValue( std::size_t index ) const {
method size (line 1790) | virtual std::size_t size() const {
class CompositeGenerator (line 1799) | class CompositeGenerator {
method CompositeGenerator (line 1801) | CompositeGenerator() : m_totalSize( 0 ) {}
method CompositeGenerator (line 1804) | CompositeGenerator( CompositeGenerator& other )
method CompositeGenerator (line 1811) | CompositeGenerator& setFileInfo( const char* fileInfo ) {
method add (line 1838) | void add( const IGenerator<T>* generator ) {
method CompositeGenerator (line 1843) | CompositeGenerator& then( CompositeGenerator& other ) {
method CompositeGenerator (line 1848) | CompositeGenerator& then( T value ) {
method move (line 1857) | void move( CompositeGenerator& other ) {
type Generators (line 1868) | namespace Generators
function between (line 1871) | CompositeGenerator<T> between( T from, T to ) {
function values (line 1878) | CompositeGenerator<T> values( T val1, T val2 ) {
function values (line 1888) | CompositeGenerator<T> values( T val1, T val2, T val3 ){
function values (line 1899) | CompositeGenerator<T> values( T val1, T val2, T val3, T val4 ) {
class TestCase (line 1932) | class TestCase
type ITestCaseRegistry (line 1933) | struct ITestCaseRegistry
type IExceptionTranslatorRegistry (line 1934) | struct IExceptionTranslatorRegistry
type IExceptionTranslator (line 1935) | struct IExceptionTranslator
type IReporterRegistry (line 1936) | struct IReporterRegistry
type IReporterFactory (line 1937) | struct IReporterFactory
type IRegistryHub (line 1939) | struct IRegistryHub {
type IMutableRegistryHub (line 1947) | struct IMutableRegistryHub {
type IExceptionTranslator (line 1966) | struct IExceptionTranslator {
type IExceptionTranslatorRegistry (line 1971) | struct IExceptionTranslatorRegistry {
class ExceptionTranslatorRegistrar (line 1977) | class ExceptionTranslatorRegistrar {
class ExceptionTranslator (line 1979) | class ExceptionTranslator : public IExceptionTranslator {
method ExceptionTranslator (line 1982) | ExceptionTranslator( std::string(*translateFunction)( T& ) )
method translate (line 1986) | virtual std::string translate() const {
method ExceptionTranslatorRegistrar (line 2001) | ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) {
type Detail (line 2021) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type Matchers (line 2099) | namespace Matchers {
type Impl (line 2100) | namespace Impl {
type Matcher (line 2103) | struct Matcher : SharedImpl<IShared>
type MatcherImpl (line 2114) | struct MatcherImpl : Matcher<ExpressionT> {
method clone (line 2116) | virtual Ptr<Matcher<ExpressionT> > clone() const {
type Generic (line 2121) | namespace Generic {
class AllOf (line 2124) | class AllOf : public MatcherImpl<AllOf<ExpressionT>, ExpressionT> {
method AllOf (line 2127) | AllOf() {}
method AllOf (line 2128) | AllOf( AllOf const& other ) : m_matchers( other.m_matchers ) {}
method AllOf (line 2130) | AllOf& add( Matcher<ExpressionT> const& matcher ) {
method match (line 2134) | virtual bool match( ExpressionT const& expr ) const
method toString (line 2141) | virtual std::string toString() const {
class AnyOf (line 2158) | class AnyOf : public MatcherImpl<AnyOf<ExpressionT>, ExpressionT> {
method AnyOf (line 2161) | AnyOf() {}
method AnyOf (line 2162) | AnyOf( AnyOf const& other ) : m_matchers( other.m_matchers ) {}
method AnyOf (line 2164) | AnyOf& add( Matcher<ExpressionT> const& matcher ) {
method match (line 2168) | virtual bool match( ExpressionT const& expr ) const
method toString (line 2175) | virtual std::string toString() const {
type StdString (line 2193) | namespace StdString {
function makeString (line 2195) | inline std::string makeString( std::string const& str ) { return...
function makeString (line 2196) | inline std::string makeString( const char* str ) { return str ? ...
type Equals (line 2198) | struct Equals : MatcherImpl<Equals, std::string> {
method Equals (line 2199) | Equals( std::string const& str ) : m_str( str ){}
method Equals (line 2200) | Equals( Equals const& other ) : m_str( other.m_str ){}
method match (line 2204) | virtual bool match( std::string const& expr ) const {
method toString (line 2207) | virtual std::string toString() const {
type Contains (line 2214) | struct Contains : MatcherImpl<Contains, std::string> {
method Contains (line 2215) | Contains( std::string const& substr ) : m_substr( substr ){}
method Contains (line 2216) | Contains( Contains const& other ) : m_substr( other.m_substr ){}
method match (line 2220) | virtual bool match( std::string const& expr ) const {
method toString (line 2223) | virtual std::string toString() const {
type StartsWith (line 2230) | struct StartsWith : MatcherImpl<StartsWith, std::string> {
method StartsWith (line 2231) | StartsWith( std::string const& substr ) : m_substr( substr ){}
method StartsWith (line 2232) | StartsWith( StartsWith const& other ) : m_substr( other.m_subs...
method match (line 2236) | virtual bool match( std::string const& expr ) const {
method toString (line 2239) | virtual std::string toString() const {
type EndsWith (line 2246) | struct EndsWith : MatcherImpl<EndsWith, std::string> {
method EndsWith (line 2247) | EndsWith( std::string const& substr ) : m_substr( substr ){}
method EndsWith (line 2248) | EndsWith( EndsWith const& other ) : m_substr( other.m_substr ){}
method match (line 2252) | virtual bool match( std::string const& expr ) const {
method toString (line 2255) | virtual std::string toString() const {
function AllOf (line 2267) | inline Impl::Generic::AllOf<ExpressionT> AllOf( Impl::Matcher<Expres...
function AllOf (line 2272) | inline Impl::Generic::AllOf<ExpressionT> AllOf( Impl::Matcher<Expres...
function AnyOf (line 2278) | inline Impl::Generic::AnyOf<ExpressionT> AnyOf( Impl::Matcher<Expres...
function AnyOf (line 2283) | inline Impl::Generic::AnyOf<ExpressionT> AnyOf( Impl::Matcher<Expres...
function Equals (line 2289) | inline Impl::StdString::Equals Equals( std::string const& str ) {
function Equals (line 2292) | inline Impl::StdString::Equals Equals( const char* str ) {
function Contains (line 2295) | inline Impl::StdString::Contains Contains( std::string const& sub...
function Contains (line 2298) | inline Impl::StdString::Contains Contains( const char* substr ) {
function StartsWith (line 2301) | inline Impl::StdString::StartsWith StartsWith( std::string const& s...
function StartsWith (line 2304) | inline Impl::StdString::StartsWith StartsWith( const char* substr ) {
function EndsWith (line 2307) | inline Impl::StdString::EndsWith EndsWith( std::string const& sub...
function EndsWith (line 2310) | inline Impl::StdString::EndsWith EndsWith( const char* substr ) {
type TagAlias (line 2330) | struct TagAlias {
method TagAlias (line 2331) | TagAlias( std::string _tag, SourceLineInfo _lineInfo ) : tag( _tag )...
type RegistrarForTagAliases (line 2337) | struct RegistrarForTagAliases {
class Option (line 2351) | class Option {
method Option (line 2353) | Option() : nullableValue( NULL ) {}
method Option (line 2354) | Option( T const& _value )
method Option (line 2357) | Option( Option const& _other )
method Option (line 2365) | Option& operator= ( Option const& _other ) {
method Option (line 2373) | Option& operator = ( T const& _value ) {
method reset (line 2379) | void reset() {
method T (line 2385) | T& operator*() { return *nullableValue; }
method T (line 2386) | T const& operator*() const { return *nullableValue; }
method T (line 2387) | T* operator->() { return nullableValue; }
method T (line 2388) | const T* operator->() const { return nullableValue; }
method T (line 2390) | T valueOr( T const& defaultValue ) const {
method some (line 2394) | bool some() const { return nullableValue != NULL; }
method none (line 2395) | bool none() const { return nullableValue == NULL; }
type ITagAliasRegistry (line 2411) | struct ITagAliasRegistry {
type ITestCase (line 2436) | struct ITestCase
type TestCaseInfo (line 2438) | struct TestCaseInfo {
type SpecialProperties (line 2439) | enum SpecialProperties{
class TestCase (line 2470) | class TestCase : public TestCaseInfo {
class TestSpec (line 2739) | class TestSpec {
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
class TestSpecParser (line 2845) | class TestSpecParser {
type Mode (line 2846) | enum Mode{ None, Name, QuotedName, Tag }
method TestSpecParser (line 2856) | TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases...
method TestSpecParser (line 2858) | TestSpecParser& parse( std::string const& arg ) {
method TestSpec (line 2869) | TestSpec testSpec() {
method visitChar (line 2874) | void visitChar( char c ) {
method startNewMode (line 2902) | void startNewMode( Mode mode, std::size_t start ) {
method subString (line 2906) | std::string subString() const { return m_arg.substr( m_start, m_pos ...
method addPattern (line 2908) | void addPattern() {
method addFilter (line 2923) | void addFilter() {
function TestSpec (line 2930) | inline TestSpec parseTestSpec( std::string const& arg ) {
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
type Verbosity (line 2949) | struct Verbosity { enum Level {
type Level (line 2949) | enum Level {
type WarnAbout (line 2955) | struct WarnAbout { enum What {
type What (line 2955) | enum What {
type ShowDurations (line 2960) | struct ShowDurations { enum OrNot {
type OrNot (line 2960) | enum OrNot {
class TestSpec (line 2966) | class TestSpec
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
type IConfig (line 2968) | struct IConfig : IShared {
class Stream (line 2996) | class Stream {
type ConfigData (line 3020) | struct ConfigData {
method ConfigData (line 3022) | ConfigData()
class Config (line 3063) | class Config : public SharedImpl<IConfig> {
method Config (line 3070) | Config()
method Config (line 3074) | Config( ConfigData const& data )
method setFilename (line 3091) | void setFilename( std::string const& filename ) {
method listTests (line 3099) | bool listTests() const { return m_data.listTests; }
method listTestNamesOnly (line 3100) | bool listTestNamesOnly() const { return m_data.listTestNamesOnly; }
method listTags (line 3101) | bool listTags() const { return m_data.listTags; }
method listReporters (line 3102) | bool listReporters() const { return m_data.listReporters; }
method getProcessName (line 3104) | std::string getProcessName() const { return m_data.processName; }
method shouldDebugBreak (line 3106) | bool shouldDebugBreak() const { return m_data.shouldDebugBreak; }
method setStreamBuf (line 3108) | void setStreamBuf( std::streambuf* buf ) {
method useStream (line 3112) | void useStream( std::string const& streamName ) {
method getReporterName (line 3119) | std::string getReporterName() const { return m_data.reporterName; }
method abortAfter (line 3121) | int abortAfter() const { return m_data.abortAfter; }
method TestSpec (line 3123) | TestSpec const& testSpec() const { return m_testSpec; }
method showHelp (line 3125) | bool showHelp() const { return m_data.showHelp; }
method showInvisibles (line 3126) | bool showInvisibles() const { return m_data.showInvisibles; }
method allowThrows (line 3129) | virtual bool allowThrows() const { return !m_data.noThrow; }
method name (line 3131) | virtual std::string name() const { return m_data.name.empty()...
method includeSuccessfulResults (line 3132) | virtual bool includeSuccessfulResults() const { return m_data.show...
method warnAboutMissingAssertions (line 3133) | virtual bool warnAboutMissingAssertions() const { return m_data.warn...
method showDurations (line 3134) | virtual ShowDurations::OrNot showDurations() const { return m_data.s...
function abortAfterFirst (line 4018) | inline void abortAfterFirst( ConfigData& config ) { config.abortAfter ...
function abortAfterX (line 4019) | inline void abortAfterX( ConfigData& config, int x ) {
function addTestOrTags (line 4024) | inline void addTestOrTags( ConfigData& config, std::string const& _tes...
function addWarning (line 4026) | inline void addWarning( ConfigData& config, std::string const& _warnin...
function setVerbosity (line 4033) | inline void setVerbosity( ConfigData& config, int level ) {
function setShowDurations (line 4037) | inline void setShowDurations( ConfigData& config, bool _showDurations ) {
function loadTestNamesFromFile (line 4042) | inline void loadTestNamesFromFile( ConfigData& config, std::string con...
function makeCommandLineParser (line 4055) | inline Clara::CommandLine<ConfigData> makeCommandLineParser() {
type Detail (line 4316) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type Colour (line 4320) | struct Colour {
type Code (line 4321) | enum Code {
type ReporterConfig (line 4383) | struct ReporterConfig {
method ReporterConfig (line 4384) | explicit ReporterConfig( Ptr<IConfig> const& _fullConfig )
method ReporterConfig (line 4387) | ReporterConfig( Ptr<IConfig> const& _fullConfig, std::ostream& _stre...
method fullConfig (line 4391) | Ptr<IConfig> fullConfig() const { return m_fullConfig; }
type ReporterPreferences (line 4398) | struct ReporterPreferences {
method ReporterPreferences (line 4399) | ReporterPreferences()
type LazyStat (line 4407) | struct LazyStat : Option<T> {
method LazyStat (line 4408) | LazyStat() : used( false ) {}
method LazyStat (line 4409) | LazyStat& operator=( T const& _value ) {
method reset (line 4414) | void reset() {
type TestRunInfo (line 4421) | struct TestRunInfo {
method TestRunInfo (line 4422) | TestRunInfo( std::string const& _name ) : name( _name ) {}
type GroupInfo (line 4425) | struct GroupInfo {
method GroupInfo (line 4426) | GroupInfo( std::string const& _name,
type AssertionStats (line 4439) | struct AssertionStats {
method AssertionStats (line 4440) | AssertionStats( AssertionResult const& _assertionResult,
method AssertionStats (line 4460) | AssertionStats( AssertionStats const& ) = default;
method AssertionStats (line 4461) | AssertionStats( AssertionStats && ) = default;
method AssertionStats (line 4462) | AssertionStats& operator = ( AssertionStats const& ) = default;
method AssertionStats (line 4463) | AssertionStats& operator = ( AssertionStats && ) = default;
type SectionStats (line 4471) | struct SectionStats {
method SectionStats (line 4472) | SectionStats( SectionInfo const& _sectionInfo,
method SectionStats (line 4483) | SectionStats( SectionStats const& ) = default;
method SectionStats (line 4484) | SectionStats( SectionStats && ) = default;
method SectionStats (line 4485) | SectionStats& operator = ( SectionStats const& ) = default;
method SectionStats (line 4486) | SectionStats& operator = ( SectionStats && ) = default;
type TestCaseStats (line 4495) | struct TestCaseStats {
method TestCaseStats (line 4496) | TestCaseStats( TestCaseInfo const& _testInfo,
method TestCaseStats (line 4510) | TestCaseStats( TestCaseStats const& ) = default;
method TestCaseStats (line 4511) | TestCaseStats( TestCaseStats && ) = default;
method TestCaseStats (line 4512) | TestCaseStats& operator = ( TestCaseStats const& ) = default;
method TestCaseStats (line 4513) | TestCaseStats& operator = ( TestCaseStats && ) = default;
type TestGroupStats (line 4523) | struct TestGroupStats {
method TestGroupStats (line 4524) | TestGroupStats( GroupInfo const& _groupInfo,
method TestGroupStats (line 4531) | TestGroupStats( GroupInfo const& _groupInfo )
method TestGroupStats (line 4538) | TestGroupStats( TestGroupStats const& ) = default;
method TestGroupStats (line 4539) | TestGroupStats( TestGroupStats && ) = default;
method TestGroupStats (line 4540) | TestGroupStats& operator = ( TestGroupStats const& ) = default;
method TestGroupStats (line 4541) | TestGroupStats& operator = ( TestGroupStats && ) = default;
type TestRunStats (line 4549) | struct TestRunStats {
method TestRunStats (line 4550) | TestRunStats( TestRunInfo const& _runInfo,
method TestRunStats (line 4560) | TestRunStats( TestRunStats const& _other )
method TestRunStats (line 4566) | TestRunStats( TestRunStats const& ) = default;
method TestRunStats (line 4567) | TestRunStats( TestRunStats && ) = default;
method TestRunStats (line 4568) | TestRunStats& operator = ( TestRunStats const& ) = default;
method TestRunStats (line 4569) | TestRunStats& operator = ( TestRunStats && ) = default;
type IStreamingReporter (line 4577) | struct IStreamingReporter : IShared {
type IReporterFactory (line 4602) | struct IReporterFactory {
type IReporterRegistry (line 4608) | struct IReporterRegistry {
function listTests (line 4623) | inline std::size_t listTests( Config const& config ) {
function listTestsNamesOnly (line 4662) | inline std::size_t listTestsNamesOnly( Config const& config ) {
type TagInfo (line 4679) | struct TagInfo {
method TagInfo (line 4680) | TagInfo() : count ( 0 ) {}
method add (line 4681) | void add( std::string const& spelling ) {
method all (line 4685) | std::string all() const {
function listTags (line 4697) | inline std::size_t listTags( Config const& config ) {
function listReporters (line 4742) | inline std::size_t listReporters( Config const& /*config*/ ) {
function list (line 4765) | inline Option<std::size_t> list( Config const& config ) {
type SectionTracking (line 4791) | namespace SectionTracking {
class TrackedSection (line 4793) | class TrackedSection {
type RunState (line 4798) | enum RunState {
method TrackedSection (line 4805) | TrackedSection( std::string const& name, TrackedSection* parent )
method RunState (line 4809) | RunState runState() const { return m_runState; }
method TrackedSection (line 4811) | TrackedSection* findChild( std::string const& childName ) {
method TrackedSection (line 4817) | TrackedSection* acquireChild( std::string const& childName ) {
method enter (line 4823) | void enter() {
method leave (line 4827) | void leave() {
method TrackedSection (line 4837) | TrackedSection* getParent() {
method hasChildren (line 4840) | bool hasChildren() const {
class TestCaseTracker (line 4852) | class TestCaseTracker {
method TestCaseTracker (line 4854) | TestCaseTracker( std::string const& testCaseName )
method enterSection (line 4860) | bool enterSection( std::string const& name ) {
method leaveSection (line 4869) | void leaveSection() {
method currentSectionHasChildren (line 4876) | bool currentSectionHasChildren() const {
method isCompleted (line 4879) | bool isCompleted() const {
class Guard (line 4883) | class Guard {
method Guard (line 4885) | Guard( TestCaseTracker& tracker ) : m_tracker( tracker ) {
method enterTestCase (line 4898) | void enterTestCase() {
method leaveTestCase (line 4903) | void leaveTestCase() {
class StreamRedirect (line 4923) | class StreamRedirect {
method StreamRedirect (line 4926) | StreamRedirect( std::ostream& stream, std::string& targetString )
class RunContext (line 4948) | class RunContext : public IResultCapture, public IRunner {
method RunContext (line 4955) | explicit RunContext( Ptr<IConfig const> const& config, Ptr<IStreamin...
method testGroupStarting (line 4979) | void testGroupStarting( std::string const& testSpec, std::size_t gro...
method testGroupEnded (line 4982) | void testGroupEnded( std::string const& testSpec, Totals const& tota...
method Totals (line 4986) | Totals runTest( TestCase const& testCase ) {
method config (line 5021) | Ptr<IConfig const> config() const {
method assertionEnded (line 5027) | virtual void assertionEnded( AssertionResult const& result ) {
method sectionStarted (line 5043) | virtual bool sectionStarted (
method testForMissingAssertions (line 5062) | bool testForMissingAssertions( Counts& assertions ) {
method sectionEnded (line 5072) | virtual void sectionEnded( SectionInfo const& info, Counts const& pr...
method pushScopedMessage (line 5087) | virtual void pushScopedMessage( MessageInfo const& message ) {
method popScopedMessage (line 5091) | virtual void popScopedMessage( MessageInfo const& message ) {
method getCurrentTestName (line 5095) | virtual std::string getCurrentTestName() const {
method AssertionResult (line 5101) | virtual const AssertionResult* getLastResult() const {
method aborting (line 5107) | bool aborting() const {
method runCurrentTest (line 5113) | void runCurrentTest( std::string& redirectedCout, std::string& redir...
type UnfinishedSections (line 5169) | struct UnfinishedSections {
method UnfinishedSections (line 5170) | UnfinishedSections( SectionInfo const& _info, Counts const& _prevA...
function IResultCapture (line 5196) | IResultCapture& getResultCapture() {
type Version (line 5211) | struct Version {
method Version (line 5212) | Version( unsigned int _majorVersion,
class Runner (line 5240) | class Runner {
method Runner (line 5243) | Runner( Ptr<Config> const& config )
method Totals (line 5250) | Totals runTests() {
method openStream (line 5284) | void openStream() {
method makeReporter (line 5296) | void makeReporter() {
class Session (line 5316) | class Session {
type OnUnusedOptions (line 5321) | struct OnUnusedOptions { enum DoWhat { Ignore, Fail }; }
type DoWhat (line 5321) | enum DoWhat { Ignore, Fail }
method Session (line 5323) | Session()
method showHelp (line 5336) | void showHelp( std::string const& processName ) {
method applyCommandLine (line 5348) | int applyCommandLine( int argc, char* const argv[], OnUnusedOptions:...
method useConfigData (line 5369) | void useConfigData( ConfigData const& _configData ) {
method run (line 5374) | int run( int argc, char* const argv[] ) {
method run (line 5382) | int run() {
method ConfigData (line 5409) | ConfigData& configData() {
method Config (line 5412) | Config& config() {
class TestRegistry (line 5442) | class TestRegistry : public ITestCaseRegistry {
method TestRegistry (line 5444) | TestRegistry() : m_unnamedCount( 0 ) {}
method registerTest (line 5447) | virtual void registerTest( TestCase const& testCase ) {
method getFilteredTests (line 5481) | virtual void getFilteredTests( TestSpec const& testSpec, IConfig con...
class FreeFunctionTestCase (line 5501) | class FreeFunctionTestCase : public SharedImpl<ITestCase> {
method FreeFunctionTestCase (line 5504) | FreeFunctionTestCase( TestFunction fun ) : m_fun( fun ) {}
method invoke (line 5506) | virtual void invoke() const {
function extractClassName (line 5516) | inline std::string extractClassName( std::string const& classOrQualifi...
class ReporterRegistry (line 5561) | class ReporterRegistry : public IReporterRegistry {
method IStreamingReporter (line 5569) | virtual IStreamingReporter* create( std::string const& name, Ptr<ICo...
method registerReporter (line 5576) | void registerReporter( std::string const& name, IReporterFactory* fa...
method FactoryMap (line 5580) | FactoryMap const& getFactories() const {
class ExceptionTranslatorRegistry (line 5598) | class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {
method registerTranslator (line 5604) | virtual void registerTranslator( const IExceptionTranslator* transla...
method translateActiveException (line 5608) | virtual std::string translateActiveException() const {
method tryTranslators (line 5639) | std::string tryTranslators( std::vector<const IExceptionTranslator*>...
class RegistryHub (line 5660) | class RegistryHub : public IRegistryHub, public IMutableRegistryHub {
method RegistryHub (line 5666) | RegistryHub() {
method IReporterRegistry (line 5668) | virtual IReporterRegistry const& getReporterRegistry() const {
method ITestCaseRegistry (line 5671) | virtual ITestCaseRegistry const& getTestCaseRegistry() const {
method IExceptionTranslatorRegistry (line 5674) | virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry...
method registerReporter (line 5679) | virtual void registerReporter( std::string const& name, IReporterFac...
method registerTest (line 5682) | virtual void registerTest( TestCase const& testInfo ) {
method registerTranslator (line 5685) | virtual void registerTranslator( const IExceptionTranslator* transla...
function RegistryHub (line 5696) | inline RegistryHub*& getTheRegistryHub() {
method RegistryHub (line 5666) | RegistryHub() {
method IReporterRegistry (line 5668) | virtual IReporterRegistry const& getReporterRegistry() const {
method ITestCaseRegistry (line 5671) | virtual ITestCaseRegistry const& getTestCaseRegistry() const {
method IExceptionTranslatorRegistry (line 5674) | virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry...
method registerReporter (line 5679) | virtual void registerReporter( std::string const& name, IReporterFac...
method registerTest (line 5682) | virtual void registerTest( TestCase const& testInfo ) {
method registerTranslator (line 5685) | virtual void registerTranslator( const IExceptionTranslator* transla...
function IRegistryHub (line 5704) | IRegistryHub& getRegistryHub() {
function IMutableRegistryHub (line 5707) | IMutableRegistryHub& getMutableRegistryHub() {
function cleanUp (line 5710) | void cleanUp() {
function translateActiveException (line 5715) | std::string translateActiveException() {
class StreamBufBase (line 5755) | class StreamBufBase : public std::streambuf {
class StreamBufImpl (line 5767) | class StreamBufImpl : public StreamBufBase {
method StreamBufImpl (line 5772) | StreamBufImpl() {
method overflow (line 5781) | int overflow( int c ) {
method sync (line 5793) | int sync() {
type OutputDebugWriter (line 5804) | struct OutputDebugWriter {
class Context (line 5830) | class Context : public IMutableContext {
method Context (line 5832) | Context() : m_config( NULL ), m_runner( NULL ), m_resultCapture( NUL...
method IResultCapture (line 5837) | virtual IResultCapture* getResultCapture() {
method IRunner (line 5840) | virtual IRunner* getRunner() {
method getGeneratorIndex (line 5843) | virtual size_t getGeneratorIndex( std::string const& fileInfo, size_...
method advanceGeneratorsForCurrentTest (line 5848) | virtual bool advanceGeneratorsForCurrentTest() {
method getConfig (line 5853) | virtual Ptr<IConfig const> getConfig() const {
method setResultCapture (line 5858) | virtual void setResultCapture( IResultCapture* resultCapture ) {
method setRunner (line 5861) | virtual void setRunner( IRunner* runner ) {
method setConfig (line 5864) | virtual void setConfig( Ptr<IConfig const> const& config ) {
method IGeneratorsForTest (line 5871) | IGeneratorsForTest* findGeneratorsForCurrentTest() {
method IGeneratorsForTest (line 5881) | IGeneratorsForTest& getGeneratorsForCurrentTest() {
function IMutableContext (line 5901) | IMutableContext& getCurrentMutableContext() {
function IContext (line 5906) | IContext& getCurrentContext() {
function Stream (line 5910) | Stream createStream( std::string const& streamName ) {
function cleanUpContext (line 5918) | void cleanUpContext() {
type Detail (line 5927) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
class Win32ColourImpl (line 5949) | class Win32ColourImpl : public Detail::IColourImpl {
method Win32ColourImpl (line 5951) | Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) )
method use (line 5958) | virtual void use( Colour::Code _colourCode ) {
method setTextAttribute (line 5979) | void setTextAttribute( WORD _textAttribute ) {
function shouldUseColourForPlatform (line 5986) | inline bool shouldUseColourForPlatform() {
class PosixColourImpl (line 6009) | class PosixColourImpl : public Detail::IColourImpl {
method use (line 6011) | virtual void use( Colour::Code _colourCode ) {
method setColour (line 6031) | void setColour( const char* _escapeCode ) {
function shouldUseColourForPlatform (line 6036) | inline bool shouldUseColourForPlatform() {
type NoColourImpl (line 6053) | struct NoColourImpl : Detail::IColourImpl {
method use (line 6054) | void use( Colour::Code ) {}
method IColourImpl (line 6056) | static IColourImpl* instance() {
function shouldUseColour (line 6061) | static bool shouldUseColour() {
type GeneratorInfo (line 6090) | struct GeneratorInfo : IGeneratorInfo {
method GeneratorInfo (line 6092) | GeneratorInfo( std::size_t size )
method moveNext (line 6097) | bool moveNext() {
method getCurrentIndex (line 6105) | std::size_t getCurrentIndex() const {
class GeneratorsForTest (line 6115) | class GeneratorsForTest : public IGeneratorsForTest {
method IGeneratorInfo (line 6122) | IGeneratorInfo& getGeneratorInfo( std::string const& fileInfo, std::...
method moveNext (line 6133) | bool moveNext() {
function IGeneratorsForTest (line 6148) | IGeneratorsForTest* createGeneratorsForTest()
function SourceLineInfo (line 6225) | SourceLineInfo AssertionResult::getSourceInfo() const {
method SourceLineInfo (line 234) | SourceLineInfo( SourceLineInfo && ) = default;
method SourceLineInfo (line 235) | SourceLineInfo& operator = ( SourceLineInfo const& ) = default;
method SourceLineInfo (line 236) | SourceLineInfo& operator = ( SourceLineInfo && ) = default;
function parseSpecialTag (line 6240) | inline TestCaseInfo::SpecialProperties parseSpecialTag( std::string co...
function isReservedTag (line 6254) | inline bool isReservedTag( std::string const& tag ) {
function enforceNotReservedTag (line 6257) | inline void enforceNotReservedTag( std::string const& tag, SourceLineI...
function TestCase (line 6273) | TestCase makeTestCase( ITestCase* _testCase,
function TestCase (line 6370) | TestCase TestCase::withName( std::string const& _newName ) const {
function TestCase (line 6401) | TestCase& TestCase::operator = ( TestCase const& other ) {
function TestCaseInfo (line 6407) | TestCaseInfo const& TestCase::getTestCaseInfo() const
type SpecialProperties (line 2439) | enum SpecialProperties{
type IReporter (line 6467) | struct IReporter : IShared {
class LegacyReporterAdapter (line 6486) | class LegacyReporterAdapter : public SharedImpl<IStreamingReporter>
function ReporterPreferences (line 6517) | ReporterPreferences LegacyReporterAdapter::getPreferences() const {
method ReporterPreferences (line 4399) | ReporterPreferences()
function getCurrentTicks (line 6596) | uint64_t getCurrentTicks() {
function getCurrentTicks (line 6607) | uint64_t getCurrentTicks() {
function startsWith (line 6638) | bool startsWith( std::string const& s, std::string const& prefix ) {
function endsWith (line 6641) | bool endsWith( std::string const& s, std::string const& suffix ) {
function contains (line 6644) | bool contains( std::string const& s, std::string const& infix ) {
function toLowerInPlace (line 6647) | void toLowerInPlace( std::string& s ) {
function toLower (line 6650) | std::string toLower( std::string const& s ) {
function trim (line 6655) | std::string trim( std::string const& str ) {
function throwLogicError (line 6700) | void throwLogicError( std::string const& message, SourceLineInfo const...
function isDebuggerActive (line 6761) | bool isDebuggerActive(){
function isDebuggerActive (line 6797) | bool isDebuggerActive() {
function isDebuggerActive (line 6804) | bool isDebuggerActive() {
function isDebuggerActive (line 6810) | inline bool isDebuggerActive() { return false; }
function writeToDebugConsole (line 6817) | void writeToDebugConsole( std::string const& text ) {
function writeToDebugConsole (line 6823) | void writeToDebugConsole( std::string const& text ) {
type Detail (line 6835) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
function toString (line 6871) | std::string toString( std::string const& value ) {
function toString (line 6889) | std::string toString( std::wstring const& value ) {
function toString (line 6898) | std::string toString( const char* const value ) {
function toString (line 6902) | std::string toString( char* const value ) {
function toString (line 6906) | std::string toString( const wchar_t* const value )
function toString (line 6911) | std::string toString( wchar_t* const value )
function toString (line 6916) | std::string toString( int value ) {
function toString (line 6922) | std::string toString( unsigned long value ) {
function toString (line 6931) | std::string toString( unsigned int value ) {
function fpToString (line 6936) | std::string fpToString( T value, int precision ) {
function toString (line 6951) | std::string toString( const double value ) {
function toString (line 6954) | std::string toString( const float value ) {
function toString (line 6958) | std::string toString( bool value ) {
function toString (line 6962) | std::string toString( char value ) {
function toString (line 6968) | std::string toString( signed char value ) {
function toString (line 6972) | std::string toString( unsigned char value ) {
function toString (line 6977) | std::string toString( std::nullptr_t ) {
function toString (line 6983) | std::string toString( NSString const * const& nsstring ) {
function toString (line 6993) | std::string toString( NSObject* const& nsObject ) {
function ResultBuilder (line 7014) | ResultBuilder& ResultBuilder::setResultType( ResultWas::OfType result ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7018) | ResultBuilder& ResultBuilder::setResultType( bool result ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7022) | ResultBuilder& ResultBuilder::setLhs( std::string const& lhs ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7026) | ResultBuilder& ResultBuilder::setRhs( std::string const& rhs ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function ResultBuilder (line 7030) | ResultBuilder& ResultBuilder::setOp( std::string const& op ) {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
function AssertionResult (line 7070) | AssertionResult ResultBuilder::build() const
method AssertionResult (line 672) | AssertionResult( AssertionResult const& ) = default;
method AssertionResult (line 673) | AssertionResult( AssertionResult && ) = default;
method AssertionResult (line 674) | AssertionResult& operator = ( AssertionResult const& ) = default;
method AssertionResult (line 675) | AssertionResult& operator = ( AssertionResult && ) = default;
class TagAliasRegistry (line 7123) | class TagAliasRegistry : public ITagAliasRegistry {
function TagAliasRegistry (line 7183) | TagAliasRegistry& TagAliasRegistry::get() {
function ITagAliasRegistry (line 7190) | ITagAliasRegistry const& ITagAliasRegistry::get() { return TagAliasReg...
type StreamingReporterBase (line 7213) | struct StreamingReporterBase : SharedImpl<IStreamingReporter> {
method StreamingReporterBase (line 7215) | StreamingReporterBase( ReporterConfig const& _config )
method noMatchingTestCases (line 7222) | virtual void noMatchingTestCases( std::string const& ) {}
method testRunStarting (line 7224) | virtual void testRunStarting( TestRunInfo const& _testRunInfo ) {
method testGroupStarting (line 7227) | virtual void testGroupStarting( GroupInfo const& _groupInfo ) {
method testCaseStarting (line 7231) | virtual void testCaseStarting( TestCaseInfo const& _testInfo ) {
method sectionStarting (line 7234) | virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
method sectionEnded (line 7238) | virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) {
method testCaseEnded (line 7241) | virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats *...
method testGroupEnded (line 7245) | virtual void testGroupEnded( TestGroupStats const& /* _testGroupStat...
method testRunEnded (line 7248) | virtual void testRunEnded( TestRunStats const& /* _testRunStats */ ) {
type CumulativeReporterBase (line 7264) | struct CumulativeReporterBase : SharedImpl<IStreamingReporter> {
type Node (line 7266) | struct Node : SharedImpl<> {
method Node (line 7267) | explicit Node( T const& _value ) : value( _value ) {}
type SectionNode (line 7274) | struct SectionNode : SharedImpl<> {
method SectionNode (line 7275) | explicit SectionNode( SectionStats const& _stats ) : stats( _stats...
type BySectionInfo (line 7294) | struct BySectionInfo {
method BySectionInfo (line 7295) | BySectionInfo( SectionInfo const& other ) : m_other( other ) {}
method BySectionInfo (line 7296) | BySectionInfo( BySectionInfo const& other ) : m_other( other.m_oth...
method CumulativeReporterBase (line 7309) | CumulativeReporterBase( ReporterConfig const& _config )
method testRunStarting (line 7315) | virtual void testRunStarting( TestRunInfo const& ) {}
method testGroupStarting (line 7316) | virtual void testGroupStarting( GroupInfo const& ) {}
method testCaseStarting (line 7318) | virtual void testCaseStarting( TestCaseInfo const& ) {}
method sectionStarting (line 7320) | virtual void sectionStarting( SectionInfo const& sectionInfo ) {
method assertionStarting (line 7345) | virtual void assertionStarting( AssertionInfo const& ) {}
method assertionEnded (line 7347) | virtual bool assertionEnded( AssertionStats const& assertionStats ) {
method sectionEnded (line 7353) | virtual void sectionEnded( SectionStats const& sectionStats ) {
method testCaseEnded (line 7359) | virtual void testCaseEnded( TestCaseStats const& testCaseStats ) {
method testGroupEnded (line 7370) | virtual void testGroupEnded( TestGroupStats const& testGroupStats ) {
method testRunEnded (line 7375) | virtual void testRunEnded( TestRunStats const& testRunStats ) {
class LegacyReporterRegistrar (line 7406) | class LegacyReporterRegistrar {
class ReporterFactory (line 7408) | class ReporterFactory : public IReporterFactory {
method IStreamingReporter (line 7409) | virtual IStreamingReporter* create( ReporterConfig const& config )...
method getDescription (line 7413) | virtual std::string getDescription() const {
method LegacyReporterRegistrar (line 7420) | LegacyReporterRegistrar( std::string const& name ) {
class ReporterRegistrar (line 7426) | class ReporterRegistrar {
class ReporterFactory (line 7428) | class ReporterFactory : public IReporterFactory {
method IStreamingReporter (line 7441) | virtual IStreamingReporter* create( ReporterConfig const& config )...
method getDescription (line 7445) | virtual std::string getDescription() const {
method ReporterRegistrar (line 7452) | ReporterRegistrar( std::string const& name ) {
class XmlWriter (line 7473) | class XmlWriter {
class ScopedElement (line 7476) | class ScopedElement {
method ScopedElement (line 7478) | ScopedElement( XmlWriter* writer )
method ScopedElement (line 7482) | ScopedElement( ScopedElement const& other )
method ScopedElement (line 7492) | ScopedElement& writeText( std::string const& text, bool indent = t...
method ScopedElement (line 7498) | ScopedElement& writeAttribute( std::string const& name, T const& a...
method XmlWriter (line 7507) | XmlWriter()
method XmlWriter (line 7513) | XmlWriter( std::ostream& os )
method XmlWriter (line 7545) | XmlWriter& startElement( std::string const& name ) {
method ScopedElement (line 7555) | ScopedElement scopedElement( std::string const& name ) {
method ScopedElement (line 7478) | ScopedElement( XmlWriter* writer )
method ScopedElement (line 7482) | ScopedElement( ScopedElement const& other )
method ScopedElement (line 7492) | ScopedElement& writeText( std::string const& text, bool indent = t...
method ScopedElement (line 7498) | ScopedElement& writeAttribute( std::string const& name, T const& a...
method XmlWriter (line 7561) | XmlWriter& endElement() {
method XmlWriter (line 7575) | XmlWriter& writeAttribute( std::string const& name, std::string cons...
method XmlWriter (line 7584) | XmlWriter& writeAttribute( std::string const& name, bool attribute ) {
method XmlWriter (line 7590) | XmlWriter& writeAttribute( std::string const& name, T const& attribu...
method XmlWriter (line 7596) | XmlWriter& writeText( std::string const& text, bool indent = true ) {
method XmlWriter (line 7608) | XmlWriter& writeComment( std::string const& text ) {
method XmlWriter (line 7615) | XmlWriter& writeBlankLine() {
method setStream (line 7621) | void setStream( std::ostream& os ) {
method ensureTagClosed (line 7633) | void ensureTagClosed() {
method newlineIfNecessary (line 7640) | void newlineIfNecessary() {
method writeEncodedText (line 7647) | void writeEncodedText( std::string const& text ) {
class XmlReporter (line 7680) | class XmlReporter : public SharedImpl<IReporter> {
method XmlReporter (line 7682) | XmlReporter( ReporterConfig const& config ) : m_config( config ), m_...
method getDescription (line 7684) | static std::string getDescription() {
method shouldRedirectStdout (line 7691) | virtual bool shouldRedirectStdout() const {
method StartTesting (line 7695) | virtual void StartTesting() {
method EndTesting (line 7702) | virtual void EndTesting( const Totals& totals ) {
method StartGroup (line 7710) | virtual void StartGroup( const std::string& groupName ) {
method EndGroup (line 7715) | virtual void EndGroup( const std::string&, const Totals& totals ) {
method StartSection (line 7723) | virtual void StartSection( const std::string& sectionName, const std...
method NoAssertionsInSection (line 7730) | virtual void NoAssertionsInSection( const std::string& ) {}
method NoAssertionsInTestCase (line 7731) | virtual void NoAssertionsInTestCase( const std::string& ) {}
method EndSection (line 7733) | virtual void EndSection( const std::string& /*sectionName*/, const C...
method StartTestCase (line 7743) | virtual void StartTestCase( const Catch::TestCaseInfo& testInfo ) {
method Result (line 7748) | virtual void Result( const Catch::AssertionResult& assertionResult ) {
method Aborted (line 7798) | virtual void Aborted() {
method EndTestCase (line 7802) | virtual void EndTestCase( const Catch::TestCaseInfo&, const Totals&,...
class JunitReporter (line 7823) | class JunitReporter : public CumulativeReporterBase {
method JunitReporter (line 7825) | JunitReporter( ReporterConfig const& _config )
method getDescription (line 7832) | static std::string getDescription() {
method noMatchingTestCases (line 7836) | virtual void noMatchingTestCases( std::string const& /*spec*/ ) {}
method ReporterPreferences (line 7838) | virtual ReporterPreferences getPreferences() const {
method testRunStarting (line 7844) | virtual void testRunStarting( TestRunInfo const& runInfo ) {
method testGroupStarting (line 7849) | virtual void testGroupStarting( GroupInfo const& groupInfo ) {
method assertionEnded (line 7857) | virtual bool assertionEnded( AssertionStats const& assertionStats ) {
method testCaseEnded (line 7863) | virtual void testCaseEnded( TestCaseStats const& testCaseStats ) {
method testGroupEnded (line 7869) | virtual void testGroupEnded( TestGroupStats const& testGroupStats ) {
method testRunEndedCumulative (line 7875) | virtual void testRunEndedCumulative() {
method writeGroup (line 7879) | void writeGroup( TestGroupNode const& groupNode, double suiteTime ) {
method writeTestCase (line 7904) | void writeTestCase( TestCaseNode const& testCaseNode ) {
method writeSection (line 7921) | void writeSection( std::string const& className,
method writeAssertions (line 7960) | void writeAssertions( SectionNode const& sectionNode ) {
method writeAssertion (line 7967) | void writeAssertion( AssertionStats const& stats ) {
type ConsoleReporter (line 8035) | struct ConsoleReporter : StreamingReporterBase {
method ConsoleReporter (line 8036) | ConsoleReporter( ReporterConfig const& _config )
method getDescription (line 8042) | static std::string getDescription() {
method ReporterPreferences (line 8045) | virtual ReporterPreferences getPreferences() const {
method noMatchingTestCases (line 8051) | virtual void noMatchingTestCases( std::string const& spec ) {
method assertionStarting (line 8055) | virtual void assertionStarting( AssertionInfo const& ) {
method assertionEnded (line 8058) | virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
method sectionStarting (line 8078) | virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
method sectionEnded (line 8082) | virtual void sectionEnded( SectionStats const& _sectionStats ) {
method testCaseEnded (line 8104) | virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) {
method testGroupEnded (line 8108) | virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) {
method testRunEnded (line 8117) | virtual void testRunEnded( TestRunStats const& _testRunStats ) {
class AssertionPrinter (line 8126) | class AssertionPrinter {
method AssertionPrinter (line 8129) | AssertionPrinter( std::ostream& _stream, AssertionStats const& _st...
method print (line 8196) | void print() const {
method printResultType (line 8212) | void printResultType() const {
method printOriginalExpression (line 8218) | void printOriginalExpression() const {
method printReconstructedExpression (line 8226) | void printReconstructedExpression() const {
method printMessage (line 8233) | void printMessage() const {
method printSourceInfo (line 8244) | void printSourceInfo() const {
method lazyPrint (line 8260) | void lazyPrint() {
method lazyPrintRunInfo (line 8272) | void lazyPrintRunInfo() {
method lazyPrintGroupInfo (line 8286) | void lazyPrintGroupInfo() {
method printTestCaseAndSectionHeader (line 8292) | void printTestCaseAndSectionHeader() {
method printClosedHeader (line 8316) | void printClosedHeader( std::string const& _name ) {
method printOpenHeader (line 8320) | void printOpenHeader( std::string const& _name ) {
method printHeaderString (line 8330) | void printHeaderString( std::string const& _string, std::size_t inde...
type SummaryColumn (line 8341) | struct SummaryColumn {
method SummaryColumn (line 8343) | SummaryColumn( std::string const& _label, Colour::Code _colour )
method SummaryColumn (line 8347) | SummaryColumn addRow( std::size_t count ) {
method printTotals (line 8367) | void printTotals( Totals const& totals ) {
method printSummaryRow (line 8398) | void printSummaryRow( std::string const& label, std::vector<SummaryC...
method makeRatio (line 8417) | static std::size_t makeRatio( std::size_t number, std::size_t total ) {
method printTotalsDivider (line 8430) | void printTotalsDivider( Totals const& totals ) {
method printSummaryDivider (line 8452) | void printSummaryDivider() {
type CompactReporter (line 8478) | struct CompactReporter : StreamingReporterBase {
method CompactReporter (line 8480) | CompactReporter( ReporterConfig const& _config )
method getDescription (line 8486) | static std::string getDescription() {
method ReporterPreferences (line 8490) | virtual ReporterPreferences getPreferences() const {
method noMatchingTestCases (line 8496) | virtual void noMatchingTestCases( std::string const& spec ) {
method assertionStarting (line 8500) | virtual void assertionStarting( AssertionInfo const& ) {
method assertionEnded (line 8503) | virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
method testRunEnded (line 8522) | virtual void testRunEnded( TestRunStats const& _testRunStats ) {
class AssertionPrinter (line 8529) | class AssertionPrinter {
method AssertionPrinter (line 8532) | AssertionPrinter( std::ostream& _stream, AssertionStats const& _st...
method print (line 8541) | void print() {
method dimColour (line 8605) | static Colour::Code dimColour() { return Colour::FileName; }
method printSourceInfo (line 8615) | void printSourceInfo() const {
method printResultType (line 8620) | void printResultType( Colour::Code colour, std::string passOrFail ...
method printIssue (line 8630) | void printIssue( std::string issue ) const {
method printExpressionWas (line 8634) | void printExpressionWas() {
method printOriginalExpression (line 8645) | void printOriginalExpression() const {
method printReconstructedExpression (line 8651) | void printReconstructedExpression() const {
method printMessage (line 8661) | void printMessage() {
method printRemainingMessages (line 8668) | void printRemainingMessages( Colour::Code colour = dimColour() ) {
method bothOrAll (line 8709) | std::string bothOrAll( std::size_t count ) const {
method printTotals (line 8713) | void printTotals( const Totals& totals ) const {
type Catch (line 304) | namespace Catch {
class NonCopyable (line 178) | class NonCopyable {
method NonCopyable (line 182) | NonCopyable() {}
class SafeBool (line 186) | class SafeBool {
method type (line 190) | static type makeSafe( bool value ) {
method trueValue (line 194) | void trueValue() const {}
function deleteAll (line 198) | inline void deleteAll( ContainerT& container ) {
function deleteAllValues (line 205) | inline void deleteAllValues( AssociativeContainerT& container ) {
type pluralise (line 219) | struct pluralise {
type SourceLineInfo (line 228) | struct SourceLineInfo {
method SourceLineInfo (line 234) | SourceLineInfo( SourceLineInfo && ) = default;
method SourceLineInfo (line 235) | SourceLineInfo& operator = ( SourceLineInfo const& ) = default;
method SourceLineInfo (line 236) | SourceLineInfo& operator = ( SourceLineInfo && ) = default;
function isTrue (line 248) | inline bool isTrue( bool value ){ return value; }
function alwaysTrue (line 249) | inline bool alwaysTrue() { return true; }
function alwaysFalse (line 250) | inline bool alwaysFalse() { return false; }
type StreamEndStop (line 258) | struct StreamEndStop {
function T (line 264) | T const& operator + ( T const& value, StreamEndStop ) {
class NotImplementedException (line 276) | class NotImplementedException : public std::exception
method NotImplementedException (line 280) | NotImplementedException( NotImplementedException const& ) {}
type IGeneratorInfo (line 306) | struct IGeneratorInfo {
type IGeneratorsForTest (line 312) | struct IGeneratorsForTest {
class Ptr (line 337) | class Ptr {
method Ptr (line 339) | Ptr() : m_p( NULL ){}
method Ptr (line 340) | Ptr( T* p ) : m_p( p ){
method Ptr (line 344) | Ptr( Ptr const& other ) : m_p( other.m_p ){
method reset (line 352) | void reset() {
method Ptr (line 357) | Ptr& operator = ( T* p ){
method Ptr (line 362) | Ptr& operator = ( Ptr const& other ){
method swap (line 367) | void swap( Ptr& other ) { std::swap( m_p, other.m_p ); }
method T (line 368) | T* get() { return m_p; }
method T (line 369) | const T* get() const{ return m_p; }
method T (line 370) | T& operator*() const { return *m_p; }
method T (line 371) | T* operator->() const { return m_p; }
type IShared (line 379) | struct IShared : NonCopyable {
type SharedImpl (line 386) | struct SharedImpl : T {
method SharedImpl (line 388) | SharedImpl() : m_rc( 0 ){}
method addRef (line 390) | virtual void addRef() const {
method release (line 393) | virtual void release() const {
class TestCase (line 413) | class TestCase
class Stream (line 414) | class Stream
type IResultCapture (line 415) | struct IResultCapture
type IRunner (line 416) | struct IRunner
type IGeneratorsForTest (line 417) | struct IGeneratorsForTest
type IConfig (line 418) | struct IConfig
type IContext (line 420) | struct IContext
type IMutableContext (line 431) | struct IMutableContext : IContext
class TestSpec (line 456) | class TestSpec
type Pattern (line 2740) | struct Pattern : SharedImpl<> {
class NamePattern (line 2744) | class NamePattern : public Pattern {
type WildcardPosition (line 2745) | enum WildcardPosition {
method NamePattern (line 2753) | NamePattern( std::string const& name ) : m_name( toLower( name ) )...
method matches (line 2764) | virtual bool matches( TestCaseInfo const& testCase ) const {
class TagPattern (line 2789) | class TagPattern : public Pattern {
method TagPattern (line 2791) | TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
method matches (line 2793) | virtual bool matches( TestCaseInfo const& testCase ) const {
class ExcludedPattern (line 2799) | class ExcludedPattern : public Pattern {
method ExcludedPattern (line 2801) | ExcludedPattern( Ptr<Pattern> const& underlyingPattern ) : m_under...
method matches (line 2803) | virtual bool matches( TestCaseInfo const& testCase ) const { retur...
type Filter (line 2808) | struct Filter {
method matches (line 2811) | bool matches( TestCaseInfo const& testCase ) const {
method hasFilters (line 2821) | bool hasFilters() const {
method matches (line 2824) | bool matches( TestCaseInfo const& testCase ) const {
type ITestCase (line 458) | struct ITestCase : IShared {
class TestCase (line 464) | class TestCase
type IConfig (line 465) | struct IConfig
type ITestCaseRegistry (line 467) | struct ITestCaseRegistry {
class MethodTestCase (line 478) | class MethodTestCase : public SharedImpl<ITestCase> {
method MethodTestCase (line 481) | MethodTestCase( void (C::*method)() ) : m_method( method ) {}
method invoke (line 483) | virtual void invoke() const {
type NameAndDesc (line 496) | struct NameAndDesc {
method NameAndDesc (line 497) | NameAndDesc( const char* _name = "", const char* _description= "" )
type AutoReg (line 505) | struct AutoReg {
method AutoReg (line 512) | AutoReg( void (C::*method)(),
type ResultWas (line 592) | struct ResultWas { enum OfType {
type OfType (line 592) | enum OfType {
function isOk (line 610) | inline bool isOk( ResultWas::OfType resultType ) {
function isJustInfo (line 613) | inline bool isJustInfo( int flags ) {
type ResultDisposition (line 618) | struct ResultDisposition { enum Flags {
type Flags (line 618) | enum Flags {
function shouldContinueOnFailure (line 630) | inline bool shouldContinueOnFailure( int flags ) { return ( flags &...
function isFalseTest (line 631) | inline bool isFalseTest( int flags ) { return ( flags &...
function shouldSuppressFailure (line 632) | inline bool shouldSuppressFailure( int flags ) { return ( flags &...
type AssertionInfo (line 643) | struct AssertionInfo
method AssertionInfo (line 645) | AssertionInfo() {}
type AssertionResultData (line 657) | struct AssertionResultData
method AssertionResultData (line 659) | AssertionResultData() : resultType( ResultWas::Unknown ) {}
class AssertionResult (line 666) | class AssertionResult {
method AssertionResult (line 672) | AssertionResult( AssertionResult const& ) = default;
method AssertionResult (line 673) | AssertionResult( AssertionResult && ) = default;
method AssertionResult (line 674) | AssertionResult& operator = ( AssertionResult const& ) = default;
method AssertionResult (line 675) | AssertionResult& operator = ( AssertionResult && ) = default;
type TestFailureException (line 700) | struct TestFailureException{}
class ExpressionLhs (line 702) | class ExpressionLhs
method ExpressionLhs (line 1218) | ExpressionLhs& operator = ( ExpressionLhs && ) = delete;
method ExpressionLhs (line 1222) | ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {}
method ExpressionLhs (line 1224) | ExpressionLhs( ExpressionLhs const& ) = default;
method ExpressionLhs (line 1225) | ExpressionLhs( ExpressionLhs && ) = default;
method ResultBuilder (line 1229) | ResultBuilder& operator == ( RhsT const& rhs ) {
method ResultBuilder (line 1234) | ResultBuilder& operator != ( RhsT const& rhs ) {
method ResultBuilder (line 1239) | ResultBuilder& operator < ( RhsT const& rhs ) {
method ResultBuilder (line 1244) | ResultBuilder& operator > ( RhsT const& rhs ) {
method ResultBuilder (line 1249) | ResultBuilder& operator <= ( RhsT const& rhs ) {
method ResultBuilder (line 1254) | ResultBuilder& operator >= ( RhsT const& rhs ) {
method ResultBuilder (line 1258) | ResultBuilder& operator == ( bool rhs ) {
method ResultBuilder (line 1262) | ResultBuilder& operator != ( bool rhs ) {
method endExpression (line 1266) | void endExpression() {
method ResultBuilder (line 1285) | ResultBuilder& captureExpression( RhsT const& rhs ) {
type STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison (line 704) | struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_C...
type CopyableStream (line 706) | struct CopyableStream {
method CopyableStream (line 707) | CopyableStream() {}
method CopyableStream (line 708) | CopyableStream( CopyableStream const& other ) {
method CopyableStream (line 711) | CopyableStream& operator=( CopyableStream const& other ) {
class ResultBuilder (line 719) | class ResultBuilder {
method ResultBuilder (line 731) | ResultBuilder& operator << ( T const& value ) {
type ExprComponents (line 760) | struct ExprComponents {
method ExprComponents (line 761) | ExprComponents() : testFalse( false ) {}
type Internal (line 788) | namespace Internal {
type Operator (line 790) | enum Operator {
type OperatorTraits (line 799) | struct OperatorTraits { static const char* getName(){ re...
type OperatorTraits<IsEqualTo> (line 800) | struct OperatorTraits<IsEqualTo> { static const char* ge...
type OperatorTraits<IsNotEqualTo> (line 801) | struct OperatorTraits<IsNotEqualTo> { static const char* ge...
type OperatorTraits<IsLessThan> (line 802) | struct OperatorTraits<IsLessThan> { static const char* ge...
type OperatorTraits<IsGreaterThan> (line 803) | struct OperatorTraits<IsGreaterThan> { static const char* ge...
type OperatorTraits<IsLessThanOrEqualTo> (line 804) | struct OperatorTraits<IsLessThanOrEqualTo> { static const char* ge...
type OperatorTraits<IsGreaterThanOrEqualTo> (line 805) | struct OperatorTraits<IsGreaterThanOrEqualTo>{ static const char* ge...
function T (line 808) | inline T& opCast(T const& t) { return const_cast<T&>(t); }
function opCast (line 812) | inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; }
class Evaluator (line 818) | class Evaluator{}
type Evaluator<T1, T2, IsEqualTo> (line 821) | struct Evaluator<T1, T2, IsEqualTo> {
method evaluate (line 822) | static bool evaluate( T1 const& lhs, T2 const& rhs) {
type Evaluator<T1, T2, IsNotEqualTo> (line 827) | struct Evaluator<T1, T2, IsNotEqualTo> {
method evaluate (line 828) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsLessThan> (line 833) | struct Evaluator<T1, T2, IsLessThan> {
method evaluate (line 834) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsGreaterThan> (line 839) | struct Evaluator<T1, T2, IsGreaterThan> {
method evaluate (line 840) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsGreaterThanOrEqualTo> (line 845) | struct Evaluator<T1, T2, IsGreaterThanOrEqualTo> {
method evaluate (line 846) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
type Evaluator<T1, T2, IsLessThanOrEqualTo> (line 851) | struct Evaluator<T1, T2, IsLessThanOrEqualTo> {
method evaluate (line 852) | static bool evaluate( T1 const& lhs, T2 const& rhs ) {
function applyEvaluator (line 858) | bool applyEvaluator( T1 const& lhs, T2 const& rhs ) {
function compare (line 867) | bool compare( T1 const& lhs, T2 const& rhs ) {
function compare (line 872) | bool compare( unsigned int lhs, int rhs ) {
function compare (line 875) | bool compare( unsigned long lhs, int rhs ) {
function compare (line 878) | bool compare( unsigned char lhs, int rhs ) {
function compare (line 883) | bool compare( unsigned int lhs, long rhs ) {
function compare (line 886) | bool compare( unsigned long lhs, long rhs ) {
function compare (line 889) | bool compare( unsigned char lhs, long rhs ) {
function compare (line 894) | bool compare( int lhs, unsigned int rhs ) {
function compare (line 897) | bool compare( int lhs, unsigned long rhs ) {
function compare (line 900) | bool compare( int lhs, unsigned char rhs ) {
function compare (line 905) | bool compare( long lhs, unsigned int rhs ) {
function compare (line 908) | bool compare( long lhs, unsigned long rhs ) {
function compare (line 911) | bool compare( long lhs, unsigned char rhs ) {
function compare (line 916) | bool compare( long lhs, T* rhs ) {
function compare (line 919) | bool compare( T* lhs, long rhs ) {
function compare (line 924) | bool compare( int lhs, T* rhs ) {
function compare (line 927) | bool compare( T* lhs, int rhs ) {
function compare (line 933) | bool compare( std::nullptr_t, T* rhs ) {
function compare (line 936) | bool compare( T* lhs, std::nullptr_t ) {
type TrueType (line 958) | struct TrueType {
type FalseType (line 963) | struct FalseType {
type NotABooleanExpression (line 971) | struct NotABooleanExpression
type If (line 973) | struct If : NotABooleanExpression<c> {}
type If<true> (line 974) | struct If<true> : TrueType {}
type If<false> (line 975) | struct If<false> : FalseType {}
type SizedIf (line 977) | struct SizedIf
type SizedIf<sizeof(TrueType)> (line 978) | struct SizedIf<sizeof(TrueType)> : TrueType {}
type SizedIf<sizeof(FalseType)> (line 979) | struct SizedIf<sizeof(FalseType)> : FalseType {}
type Detail (line 1038) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type StringMaker (line 1109) | struct StringMaker :
type StringMaker<T*> (line 1113) | struct StringMaker<T*> {
method convert (line 1115) | static std::string convert( U* p ) {
type StringMaker<R C::*> (line 1124) | struct StringMaker<R C::*> {
method convert (line 1125) | static std::string convert( R C::* p ) {
type Detail (line 1133) | namespace Detail {
class IsStreamInsertableHelper (line 1046) | class IsStreamInsertableHelper {
type TrueIfSizeable (line 1047) | struct TrueIfSizeable : TrueType {}
type IsStreamInsertable (line 1058) | struct IsStreamInsertable : IsStreamInsertableHelper<T>::type {}
type BorgType (line 1062) | struct BorgType {
type IsStreamInsertable (line 1072) | struct IsStreamInsertable {
type StringMakerBase (line 1081) | struct StringMakerBase {
method convert (line 1083) | static std::string convert( T const& ) { return "{?}"; }
type StringMakerBase<true> (line 1087) | struct StringMakerBase<true> {
method convert (line 1089) | static std::string convert( T const& _value ) {
function rawMemoryToString (line 1099) | inline std::string rawMemoryToString( const T& object ) {
function makeString (line 1147) | std::string makeString( T const& value ) {
function rangeToString (line 1194) | std::string rangeToString( InputIterator first, InputIterator last ) {
class Approx (line 2023) | class Approx {
method Approx (line 2025) | explicit Approx ( double value )
method Approx (line 2031) | Approx( Approx const& other )
method Approx (line 2037) | static Approx custom() {
method Approx (line 2041) | Approx operator()( double value ) {
method Approx (line 2065) | Approx& epsilon( double newEpsilon ) {
method Approx (line 2070) | Approx& scale( double newScale ) {
method toString (line 2075) | std::string toString() const {
type IColourImpl (line 4317) | struct IColourImpl
type IColourImpl (line 5928) | struct IColourImpl {
type Endianness (line 6838) | struct Endianness {
type Arch (line 6839) | enum Arch { Big, Little }
method Arch (line 6841) | static Arch which() {
function rawMemoryToString (line 6853) | std::string rawMemoryToString( const void *object, std::size_t size )
type StringMaker<std::vector<T, Allocator> > (line 1139) | struct StringMaker<std::vector<T, Allocator> > {
method convert (line 1140) | static std::string convert( std::vector<T,Allocator> const& v ) {
type Detail
Condensed preview — 34 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (781K chars).
[
{
"path": ".gitattributes",
"chars": 483,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs diff=csharp\n*.sln"
},
{
"path": "CMakeLists.txt",
"chars": 1605,
"preview": "cmake_minimum_required(VERSION 2.8)\n\nproject(inpainting)\n\nfind_package(OpenCV REQUIRED)\n\ninclude_directories(${OpenCV_IN"
},
{
"path": "COPYING",
"chars": 709,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "README.md",
"chars": 3052,
"preview": "# Inpaint\n\n**Inpaint** is a C++ library providing implementations of image inpainting and image completion methods. Imag"
},
{
"path": "benchmarks/catch.hpp",
"chars": 319984,
"preview": "/*\n * CATCH v1.0 build 53 (master branch)\n * Generated: 2014-08-20 08:08:19.533804\n * -------------------------------"
},
{
"path": "benchmarks/patch.cpp",
"chars": 1920,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "examples/inpaint_image_criminisi.cpp",
"chars": 4518,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Ioobar is free software: you can redistribu"
},
{
"path": "examples/patch_match.cpp",
"chars": 2177,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Ioobar is free software: you can redistribu"
},
{
"path": "inc/inpaint/criminisi_inpainter.h",
"chars": 4737,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/gradient.h",
"chars": 2461,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/integral.h",
"chars": 1770,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/mean_shift.h",
"chars": 3187,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/patch.h",
"chars": 5693,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/patch_match.h",
"chars": 1773,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/pyramid.h",
"chars": 1128,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/stats.h",
"chars": 1712,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/template_match_candidates.h",
"chars": 6024,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "inc/inpaint/timer.h",
"chars": 1969,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "photos/CREATIVE COMMONS.txt",
"chars": 32,
"preview": "bungee: https://flic.kr/p/kjrPT8"
},
{
"path": "src/criminisi_inpainter.cpp",
"chars": 11993,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "src/mean_shift.cpp",
"chars": 11216,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "src/patch_match.cpp",
"chars": 13222,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "src/pyramid.cpp",
"chars": 1422,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "src/template_match_candidates.cpp",
"chars": 8765,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/catch.hpp",
"chars": 319984,
"preview": "/*\n * CATCH v1.0 build 53 (master branch)\n * Generated: 2014-08-20 08:08:19.533804\n * -------------------------------"
},
{
"path": "tests/criminisi_inpainter.cpp",
"chars": 1314,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/gradient.cpp",
"chars": 1863,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/integral.cpp",
"chars": 1149,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/mean_shift.cpp",
"chars": 2168,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/patch.cpp",
"chars": 6932,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/patch_match.cpp",
"chars": 2851,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/pyramid.cpp",
"chars": 1891,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/random_testdata.h",
"chars": 3718,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
},
{
"path": "tests/template_match_candidates.cpp",
"chars": 1267,
"preview": "/**\n This file is part of Inpaint.\n\n Copyright Christoph Heindl 2014\n\n Inpaint is free software: you can redistrib"
}
]
About this extraction
This page contains the full source code of the cheind/inpaint GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 34 files (737.0 KB), approximately 170.7k tokens, and a symbol index with 2145 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.