![]() |
CustusX
18.04
An IGT application
|
#include <sstream>
#include <stdexcept>
#include <algorithm>
#include <ostream>
#include <string>
#include <memory>
#include <vector>
#include <stdlib.h>
#include <iomanip>
#include <limits>
#include <cstddef>
#include <iostream>
#include <set>
#include <map>
#include <streambuf>
#include <cstdio>
#include <assert.h>
#include <stdint.h>
#include <iterator>
#include <cmath>
#include <fstream>
#include <unistd.h>
#include <sys/time.h>
Go to the source code of this file.
Namespaces | |
Catch | |
Catch::Detail | |
Catch::Internal | |
Catch::Generators | |
Catch::Matchers | |
Catch::Matchers::Impl | |
Catch::Matchers::Impl::Generic | |
Catch::Matchers::Impl::StdString | |
Typedefs | |
typedef void(* | Catch::TestFunction) () |
typedef std::string(* | Catch::exceptionTranslateFunction) () |
Functions | |
template<typename ContainerT > | |
void | Catch::deleteAll (ContainerT &container) |
template<typename AssociativeContainerT > | |
void | Catch::deleteAllValues (AssociativeContainerT &container) |
template<typename ContainerT , typename Function > | |
void | Catch::forEach (ContainerT &container, Function function) |
template<typename ContainerT , typename Function > | |
void | Catch::forEach (ContainerT const &container, Function function) |
bool | Catch::startsWith (std::string const &s, std::string const &prefix) |
bool | Catch::endsWith (std::string const &s, std::string const &suffix) |
bool | Catch::contains (std::string const &s, std::string const &infix) |
void | Catch::toLowerInPlace (std::string &s) |
std::string | Catch::toLower (std::string const &s) |
std::ostream & | Catch::operator<< (std::ostream &os, SourceLineInfo const &info) |
bool | Catch::isTrue (bool value) |
void | Catch::throwLogicError (std::string const &message, SourceLineInfo const &locationInfo) |
IGeneratorsForTest * | Catch::createGeneratorsForTest () |
IContext & | Catch::getCurrentContext () |
IMutableContext & | Catch::getCurrentMutableContext () |
void | Catch::cleanUpContext () |
Stream | Catch::createStream (std::string const &streamName) |
TrueType & | Catch::Detail::testStreamable (std::ostream &) |
FalseType | Catch::Detail::testStreamable (FalseType) |
FalseType | Catch::Detail::operator<< (std::ostream const &, BorgType const &) |
template<typename T > | |
std::string | Catch::toString (T const &value) |
converts any type to a string More... | |
template<typename T > | |
std::string | Catch::Detail::makeString (T const &value) |
std::string | Catch::toString (std::string const &value) |
std::string | Catch::toString (std::wstring const &value) |
std::string | Catch::toString (const char *const value) |
std::string | Catch::toString (char *const value) |
std::string | Catch::toString (int value) |
std::string | Catch::toString (unsigned long value) |
std::string | Catch::toString (unsigned int value) |
std::string | Catch::toString (const double value) |
std::string | Catch::toString (bool value) |
std::string | Catch::toString (char value) |
std::string | Catch::toString (signed char value) |
std::string | Catch::toString (unsigned char value) |
bool | Catch::isOk (ResultWas::OfType resultType) |
bool | Catch::isJustInfo (int flags) |
ResultDisposition::Flags | Catch::operator| (ResultDisposition::Flags lhs, ResultDisposition::Flags rhs) |
bool | Catch::shouldContinueOnFailure (int flags) |
bool | Catch::shouldNegate (int flags) |
bool | Catch::shouldSuppressFailure (int flags) |
template<typename T > | |
T & | Catch::Internal::opCast (T const &t) |
template<Operator Op, typename T1 , typename T2 > | |
bool | Catch::Internal::applyEvaluator (T1 const &lhs, T2 const &rhs) |
template<Operator Op, typename T1 , typename T2 > | |
bool | Catch::Internal::compare (T1 const &lhs, T2 const &rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (unsigned int lhs, int rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (unsigned long lhs, int rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (unsigned char lhs, int rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (unsigned int lhs, long rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (unsigned long lhs, long rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (unsigned char lhs, long rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (int lhs, unsigned int rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (int lhs, unsigned long rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (int lhs, unsigned char rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (long lhs, unsigned int rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (long lhs, unsigned long rhs) |
template<Operator Op> | |
bool | Catch::Internal::compare (long lhs, unsigned char rhs) |
template<Operator Op, typename T > | |
bool | Catch::Internal::compare (long lhs, T *rhs) |
template<Operator Op, typename T > | |
bool | Catch::Internal::compare (T *lhs, long rhs) |
template<Operator Op, typename T > | |
bool | Catch::Internal::compare (int lhs, T *rhs) |
template<Operator Op, typename T > | |
bool | Catch::Internal::compare (T *lhs, int rhs) |
void | BreakIntoDebugger () |
bool | isDebuggerActive () |
void | writeToDebugConsole (std::string const &text) |
TestCase | Catch::makeTestCase (ITestCase *testCase, std::string const &className, std::string const &name, std::string const &description, SourceLineInfo const &lineInfo) |
std::string | Catch::trim (std::string const &str) |
IRegistryHub & | Catch::getRegistryHub () |
IMutableRegistryHub & | Catch::getMutableRegistryHub () |
void | Catch::cleanUp () |
std::string | Catch::translateActiveException () |
IResultCapture & | Catch::getResultCapture () |
template<typename MatcherT > | |
ExpressionResultBuilder | Catch::expressionResultBuilderFromMatcher (MatcherT const &matcher, std::string const &matcherCallAsString) |
template<typename MatcherT , typename ArgT > | |
ExpressionResultBuilder | Catch::expressionResultBuilderFromMatcher (MatcherT const &matcher, ArgT const &arg, std::string const &matcherCallAsString) |
template<typename MatcherT , typename ArgT > | |
ExpressionResultBuilder | Catch::expressionResultBuilderFromMatcher (MatcherT const &matcher, ArgT *arg, std::string const &matcherCallAsString) |
template<typename T > | |
CompositeGenerator< T > | Catch::Generators::between (T from, T to) |
template<typename T > | |
CompositeGenerator< T > | Catch::Generators::values (T val1, T val2) |
template<typename T > | |
CompositeGenerator< T > | Catch::Generators::values (T val1, T val2, T val3) |
template<typename T > | |
CompositeGenerator< T > | Catch::Generators::values (T val1, T val2, T val3, T val4) |
template<> | |
std::string | Catch::toString< Detail::Approx > (Detail::Approx const &value) |
std::string | Catch::Matchers::Impl::StdString::makeString (std::string const &str) |
std::string | Catch::Matchers::Impl::StdString::makeString (const char *str) |
template<typename ExpressionT > | |
Impl::Generic::AllOf< ExpressionT > | Catch::Matchers::AllOf (Impl::Matcher< ExpressionT > const &m1, Impl::Matcher< ExpressionT > const &m2) |
template<typename ExpressionT > | |
Impl::Generic::AllOf< ExpressionT > | Catch::Matchers::AllOf (Impl::Matcher< ExpressionT > const &m1, Impl::Matcher< ExpressionT > const &m2, Impl::Matcher< ExpressionT > const &m3) |
template<typename ExpressionT > | |
Impl::Generic::AnyOf< ExpressionT > | Catch::Matchers::AnyOf (Impl::Matcher< ExpressionT > const &m1, Impl::Matcher< ExpressionT > const &m2) |
template<typename ExpressionT > | |
Impl::Generic::AnyOf< ExpressionT > | Catch::Matchers::AnyOf (Impl::Matcher< ExpressionT > const &m1, Impl::Matcher< ExpressionT > const &m2, Impl::Matcher< ExpressionT > const &m3) |
Impl::StdString::Equals | Catch::Matchers::Equals (std::string const &str) |
Impl::StdString::Equals | Catch::Matchers::Equals (const char *str) |
Impl::StdString::Contains | Catch::Matchers::Contains (std::string const &substr) |
Impl::StdString::Contains | Catch::Matchers::Contains (const char *substr) |
Impl::StdString::StartsWith | Catch::Matchers::StartsWith (std::string const &substr) |
Impl::StdString::StartsWith | Catch::Matchers::StartsWith (const char *substr) |
Impl::StdString::EndsWith | Catch::Matchers::EndsWith (std::string const &substr) |
Impl::StdString::EndsWith | Catch::Matchers::EndsWith (const char *substr) |
#define AND_WHEN | ( | desc | ) | SECTION( "And when: " desc, "" ) |
#define ANON_TEST_CASE | ( | ) | INTERNAL_CATCH_TESTCASE( "", "" ) |
#define CAPTURE | ( | msg | ) | INTERNAL_CATCH_INFO( #msg " := " << msg, "CAPTURE" ) |
#define CATCH_INTERNAL_ERROR | ( | msg | ) | ::Catch::throwLogicError( msg, CATCH_INTERNAL_LINEINFO ); |
#define CATCH_INTERNAL_LINEINFO ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) ) |
#define CATCH_NOT_IMPLEMENTED throw Catch::NotImplementedException( CATCH_INTERNAL_LINEINFO ) |
#define CATCH_TRANSLATE_EXCEPTION | ( | signature | ) | INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) |
#define CHECK | ( | expr | ) | INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::ContinueOnFailure, "CHECK" ) |
#define CHECK_FALSE | ( | expr | ) | INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::NegateResult, "CHECK_FALSE" ) |
#define CHECK_NOFAIL | ( | expr | ) | INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, "CHECK_NOFAIL" ) |
#define CHECK_NOTHROW | ( | expr | ) | INTERNAL_CATCH_NO_THROW( expr, Catch::ResultDisposition::ContinueOnFailure, "CHECK_NOTHROW" ) |
#define CHECK_THAT | ( | arg, | |
matcher | |||
) | INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::ContinueOnFailure, "CHECK_THAT" ) |
#define CHECK_THROWS | ( | expr | ) | INTERNAL_CATCH_THROWS( expr, ..., Catch::ResultDisposition::ContinueOnFailure, "CHECK_THROWS" ) |
#define CHECK_THROWS_AS | ( | expr, | |
exceptionType | |||
) | INTERNAL_CATCH_THROWS_AS( expr, exceptionType, Catch::ResultDisposition::ContinueOnFailure, "CHECK_THROWS_AS" ) |
#define CHECKED_ELSE | ( | expr | ) | INTERNAL_CATCH_ELSE( expr, Catch::ResultDisposition::ContinueOnFailure, "CHECKED_ELSE" ) |
#define CHECKED_IF | ( | expr | ) | INTERNAL_CATCH_IF( expr, Catch::ResultDisposition::ContinueOnFailure, "CHECKED_IF" ) |
#define FAIL | ( | msg | ) | INTERNAL_CATCH_MSG( msg, Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, "FAIL" ) |
#define GENERATE | ( | expr | ) | INTERNAL_CATCH_GENERATE( expr ) |
#define INFO | ( | msg | ) | INTERNAL_CATCH_INFO( msg, "INFO" ) |
#define INTERNAL_CATCH_ACCEPT_EXPR | ( | evaluatedExpr, | |
resultDisposition, | |||
originalExpr | |||
) |
#define INTERNAL_CATCH_ACCEPT_INFO | ( | expr, | |
macroName, | |||
resultDisposition | |||
) | Catch::AssertionInfo INTERNAL_CATCH_ASSERTIONINFO_NAME( macroName, CATCH_INTERNAL_LINEINFO, expr, resultDisposition ); |
#define INTERNAL_CATCH_ASSERTIONINFO_NAME INTERNAL_CATCH_UNIQUE_NAME( __assertionInfo ) |
#define INTERNAL_CATCH_ELSE | ( | expr, | |
resultDisposition, | |||
macroName | |||
) |
#define INTERNAL_CATCH_GENERATE | ( | expr | ) | expr.setFileInfo( __FILE__ "(" INTERNAL_CATCH_LINESTR( __LINE__ ) ")" ) |
#define INTERNAL_CATCH_IF | ( | expr, | |
resultDisposition, | |||
macroName | |||
) |
#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_CATCH_LINESTR | ( | line | ) | INTERNAL_CATCH_LINESTR2( line ) |
#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_MSG | ( | log, | |
messageType, | |||
resultDisposition, | |||
macroName | |||
) |
#define INTERNAL_CATCH_NO_THROW | ( | expr, | |
resultDisposition, | |||
macroName | |||
) |
#define INTERNAL_CATCH_SECTION | ( | name, | |
desc | |||
) | if( Catch::Section INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::Section( CATCH_INTERNAL_LINEINFO, name, desc ) ) |
#define INTERNAL_CATCH_STRINGIFY | ( | expr | ) | INTERNAL_CATCH_STRINGIFY2( expr ) |
#define INTERNAL_CATCH_TEST | ( | expr, | |
resultDisposition, | |||
macroName | |||
) |
#define INTERNAL_CATCH_TEST_CASE_METHOD | ( | ClassName, | |
TestName, | |||
Desc | |||
) |
#define INTERNAL_CATCH_TESTCASE | ( | Name, | |
Desc | |||
) |
#define INTERNAL_CATCH_THROWS | ( | expr, | |
exceptionType, | |||
resultDisposition, | |||
macroName | |||
) |
#define INTERNAL_CATCH_THROWS_AS | ( | expr, | |
exceptionType, | |||
resultDisposition, | |||
macroName | |||
) |
#define INTERNAL_CATCH_THROWS_IMPL | ( | expr, | |
exceptionType, | |||
resultDisposition | |||
) |
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION | ( | signature | ) |
#define INTERNAL_CATCH_UNIQUE_NAME | ( | name | ) | INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) |
#define INTERNAL_CATCH_UNIQUE_NAME_LINE | ( | name, | |
line | |||
) | INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) |
#define INTERNAL_CATCH_UNIQUE_NAME_LINE2 | ( | name, | |
line | |||
) | name##line |
#define INTERNAL_CHECK_THAT | ( | arg, | |
matcher, | |||
resultDisposition, | |||
macroName | |||
) |
#define METHOD_AS_TEST_CASE | ( | method, | |
name, | |||
description | |||
) | INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, name, description ) |
#define REGISTER_LEGACY_REPORTER | ( | name, | |
reporterType | |||
) | INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( name, reporterType ) |
#define REGISTER_REPORTER | ( | name, | |
reporterType | |||
) | INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType ) |
#define REQUIRE | ( | expr | ) | INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal, "REQUIRE" ) |
#define REQUIRE_FALSE | ( | expr | ) | INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::Normal | Catch::ResultDisposition::NegateResult, "REQUIRE_FALSE" ) |
#define REQUIRE_NOTHROW | ( | expr | ) | INTERNAL_CATCH_NO_THROW( expr, Catch::ResultDisposition::Normal, "REQUIRE_NOTHROW" ) |
#define REQUIRE_THAT | ( | arg, | |
matcher | |||
) | INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::Normal, "REQUIRE_THAT" ) |
#define REQUIRE_THROWS | ( | expr | ) | INTERNAL_CATCH_THROWS( expr, ..., Catch::ResultDisposition::Normal, "REQUIRE_THROWS" ) |
#define REQUIRE_THROWS_AS | ( | expr, | |
exceptionType | |||
) | INTERNAL_CATCH_THROWS_AS( expr, exceptionType, Catch::ResultDisposition::Normal, "REQUIRE_THROWS_AS" ) |
#define SCENARIO | ( | name, | |
tags | |||
) | TEST_CASE( "Scenario: " name, tags ) |
#define SCOPED_CAPTURE | ( | msg | ) | INTERNAL_CATCH_INFO( #msg " := " << msg, "CAPTURE" ) |
#define SCOPED_INFO | ( | msg | ) | INTERNAL_CATCH_INFO( msg, "INFO" ) |
#define SECTION | ( | name, | |
description | |||
) | INTERNAL_CATCH_SECTION( name, description ) |
#define SUCCEED | ( | msg | ) | INTERNAL_CATCH_MSG( msg, Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, "SUCCEED" ) |
#define TEST_CASE | ( | name, | |
description | |||
) | INTERNAL_CATCH_TESTCASE( name, description ) |
#define TEST_CASE_METHOD | ( | className, | |
name, | |||
description | |||
) | INTERNAL_CATCH_TEST_CASE_METHOD( className, name, description ) |
#define TWOBLUECUBES_CATCH_ASSERTIONRESULT_BUILDER_H_INCLUDED |
#define TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED |
#define TWOBLUECUBES_CATCH_EXPRESSION_DECOMPOSER_HPP_INCLUDED |
#define TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED |
#define TWOBLUECUBES_CATCH_INTERFACES_GENERATORS_H_INCLUDED |
#define TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED |
#define TWOBLUECUBES_CATCH_INTERFACES_REPORTER_H_INCLUDED |
#define TWOBLUECUBES_CATCH_NOTIMPLEMENTED_EXCEPTION_H_INCLUDED |
#define WARN | ( | msg | ) | INTERNAL_CATCH_MSG( msg, Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, "WARN" ) |