Lines Matching refs:Catch
3 * Catch v2.13.9
99 namespace Catch {
481 // We need a dummy global operator<< so we can bring it into Catch namespace later
485 namespace Catch {
526 // Bring in operator<< from global namespace into Catch namespace
528 // lookup stop at namespace Catch
545 ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )
548 namespace Catch {
554 } // end namespace Catch
559 namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \
569 namespace Catch {
602 namespace Catch {
684 } // namespace Catch
686 constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef {
687 return Catch::StringRef( rawChars, size );
849 void reg_test(TypeList<Type>, Catch::NameAndTags nameAndTags)\
851 Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Type>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
856 void reg_test(Nttp<__VA_ARGS__>, Catch::NameAndTags nameAndTags)\
858 Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<__VA_ARGS__>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
863 void reg_test(TypeList<Type>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\
865 Catch::AutoReg( Catch::makeTestInvoker(&TestName<Type>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\
870 void reg_test(Nttp<__VA_ARGS__>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\
872 Catch::AutoReg( Catch::makeTestInvoker(&TestName<__VA_ARGS__>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\
924 namespace Catch {
953 } // namespace Catch
960 namespace Catch {
992 } // end namespace Catch
1052 namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
1062 namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \
1073 Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
1084 Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \
1105 (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
1151 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++)... };/* NOLINT */\
1195 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */\
1229 (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++)... };/* NOLINT */ \
1278 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++)... };/* NOLINT */ \
1325 (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++)... };/* NOLINT */ \
1351 namespace Catch {
1392 } // end namespace Catch
1395 namespace Catch {
1409 } // end namespace Catch
1426 namespace Catch {
1464 namespace Catch {
1493 } // Catch
1552 namespace Catch {
1619 typename std::enable_if<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
1630 typename std::enable_if<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
1642 // This function dispatches all stringification requests inside of Catch.
1643 // Should be preferably called fully qualified, like ::Catch::Detail::stringify
1646 return ::Catch::StringMaker<typename std::remove_cv<typename std::remove_reference<T>::type>::type>::convert(e);
1651 return ::Catch::Detail::stringify(static_cast<typename std::underlying_type<E>::type>(e));
1657 return ::Catch::StringMaker<T^>::convert(e);
1714 return ::Catch::Detail::stringify(std::string{ str });
1720 return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });
1726 return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });
1801 return ::Catch::Detail::rawMemoryToString(p);
1812 return ::Catch::Detail::rawMemoryToString(p);
1823 return ::Catch::Detail::clrReferenceToString(ref);
1834 rss << ::Catch::Detail::stringify(*first);
1836 rss << ", " << ::Catch::Detail::stringify(*first);
1855 return ::Catch::Detail::stringify([nsObject description]);
1867 } // namespace Catch
1884 namespace Catch {
1890 << ::Catch::Detail::stringify(pair.first)
1892 << ::Catch::Detail::stringify(pair.second)
1902 namespace Catch {
1908 rss << ::Catch::Detail::stringify(*optional);
1921 namespace Catch {
1931 << ::Catch::Detail::stringify(std::get<N>(tuple));
1961 namespace Catch {
1977 return ::Catch::Detail::stringify(value);
1987 namespace Catch {
2020 return ::Catch::Detail::rangeToString( begin( range ), end( range ) );
2034 rss << ::Catch::Detail::stringify( b );
2041 struct StringMaker<R, typename std::enable_if<is_range<R>::value && !::Catch::Detail::IsStreamInsertable<R>::value>::type> {
2054 } // namespace Catch
2062 namespace Catch {
2071 Catch::ReusableStringStream rss;
2142 return ::Catch::Detail::stringify(time_point.time_since_epoch()) + " since epoch";
2174 namespace Catch { \
2177 static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \
2201 namespace Catch {
2232 ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) );
2305 os << Catch::Detail::stringify( m_lhs );
2426 } // end namespace Catch
2438 namespace Catch {
2520 namespace Catch {
2590 } // namespace Catch
2598 namespace Catch {
2665 captureValue( index, Catch::Detail::stringify( value ) );
2670 captureValue( index, Catch::Detail::stringify(value) );
2675 } // end namespace Catch
2707 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
2711 catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \
2720 if( Catch::getResultCapture().lastAssertionPassed() )
2725 if( !Catch::getResultCapture().lastAssertionPassed() )
2730 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
2744 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \
2761 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) ", " CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \
2781 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \
2782 catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \
2788 auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \
2793 Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log );
2797 Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )
2803 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
2810 Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \
2828 namespace Catch {
2859 namespace Catch {
2883 } // end namespace Catch
2890 namespace Catch {
2905 } // namespace Catch
2910 namespace Catch {
2929 } // end namespace Catch
2934 if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \
2940 if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \
2951 namespace Catch {
3005 namespace Catch {
3065 namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
3076 namespace Catch {
3186 struct StringMaker<Catch::Detail::Approx> {
3187 static std::string convert(Catch::Detail::Approx const& value);
3190 } // end namespace Catch
3199 namespace Catch {
3236 namespace Catch {
3268 // Hack to fix Catch GH issue #1661. Could use id for generic Object support.
3391 } // namespace Catch
3396 namespace Catch {
3418 } // namespace Catch
3423 namespace Catch {
3479 } // namespace Catch
3487 namespace Catch {
3527 } // namespace Catch
3534 namespace Catch {
3596 } // namespace Catch
3603 namespace Catch {
3622 return "Contains: " + ::Catch::Detail::stringify( m_comparator );
3652 return "Contains: " + ::Catch::Detail::stringify( m_comparator );
3676 return "Equals: " + ::Catch::Detail::stringify( m_comparator );
3695 return "is approx: " + ::Catch::Detail::stringify( m_comparator );
3714 mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();
3728 return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target);
3765 } // namespace Catch
3768 namespace Catch {
3785 os << Catch::Detail::stringify( m_arg ) << ' ';
3802 } // namespace Catch
3807 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
3809 catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \
3817 Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \
3824 catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \
3843 namespace Catch {
3867 } // namespace Catch
3874 namespace Catch {
3893 } // namespace Catch;
3896 (Catch::ReusableStringStream() << __VA_ARGS__).str()
3899 Catch::throw_logic_error(CATCH_MAKE_MSG( CATCH_INTERNAL_LINEINFO << ": Internal Catch2 error: " << __VA_ARGS__))
3902 Catch::throw_domain_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
3905 Catch::throw_runtime_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
3918 namespace Catch {
4099 } // namespace Catch
4102 Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
4104 [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
4106 Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
4108 [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
4110 Catch::Generators::generate( INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_UNIQUE_NAME(generator)), \
4112 [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)
4117 namespace Catch {
4171 Catch::throw_exception(GeneratorException("No valid value found in filtered generator"));
4312 Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
4341 } // namespace Catch
4350 namespace Catch {
4406 namespace Catch {
4466 } // end namespace Catch
4475 namespace Catch {
4552 namespace Catch {
4595 } // end namespace Catch
4600 namespace Catch {
4605 Catch::SimplePcg32& m_rng;
4627 Catch::SimplePcg32& m_rng;
4724 Catch::throw_exception(GeneratorException("IteratorGenerator received no valid values"));
4752 } // namespace Catch
4769 namespace Catch {
4839 namespace Catch {
4872 namespace Catch {
4970 return "equals string: " + Catch::Detail::stringify( m_substr );
4983 return "contains string: " + Catch::Detail::stringify( m_substr );
4996 return "starts with: " + Catch::Detail::stringify( m_substr );
5008 return "ends with: " + Catch::Detail::stringify( m_substr );
5033 } // namespace Catch
5079 namespace Catch
5108 namespace Catch {
5184 namespace Catch {
5197 } // end namespace Catch
5200 namespace Catch {
5253 } // namespace Catch
5270 namespace Catch {
5375 } // end namespace Catch
5382 namespace Catch {
5421 } // end namespace Catch
5430 namespace Catch {
5445 } // namespace Catch
5452 namespace Catch {
5466 } // namespace Catch
5480 namespace Catch {
5714 } // end namespace Catch
5725 namespace Catch {
5984 } // end namespace Catch
5989 namespace Catch {
6043 } // end namespace Catch
6049 namespace Catch {
6098 namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); } \
6104 namespace{ Catch::ListenerRegistrar<listenerType> catch_internal_RegistrarFor##listenerType; } \
6117 namespace Catch {
6139 } // end namespace Catch
6151 namespace Catch {
6212 } // end namespace Catch
6225 namespace Catch {
6275 XmlWriter( std::ostream& os = Catch::cout() );
6326 namespace Catch {
6371 } // end namespace Catch
6376 namespace Catch {
6426 } // end namespace Catch
6457 namespace Catch {
6478 } // namespace Catch
6490 namespace Catch {
6538 } // namespace Catch
6549 namespace Catch {
6595 } // namespace Catch
6598 namespace Catch {
6648 } // namespace Catch
6656 namespace Catch {
6675 } // namespace Catch
6693 namespace Catch {
6773 } // namespace Catch
6784 namespace Catch {
6802 } // namespace Catch
6823 namespace Catch {
6834 } // namespace Catch
6839 namespace Catch {
6852 } // namespace Catch
6858 namespace Catch {
6893 Catch::throw_exception(optimized_away_error{});
6897 } // namespace Catch
6903 namespace Catch {
6936 } // namespace Catch
6960 namespace Catch {
7089 } // namespace Catch
7098 namespace Catch {
7184 } // namespace Catch
7202 namespace Catch {
7227 } // namespace Catch
7234 namespace Catch {
7244 auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());
7245 auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());
7288 } // namespace Catch
7297 namespace Catch {
7372 } // namespace Catch
7378 if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
7382 if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
7393 namespace Catch {
7476 namespace Catch {
7634 } // namespace Catch
7640 namespace Catch {
7740 auto m = Catch::Benchmark::Detail::mean(first, last);
7750 namespace Catch {
7857 } // namespace Catch
7876 namespace Catch {
7898 rss << "Approx( " << ::Catch::Detail::stringify( m_value ) << " )";
7934 std::string StringMaker<Catch::Detail::Approx>::convert(Catch::Detail::Approx const& value) {
7938 } // end namespace Catch
7944 namespace Catch {
7989 #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()
8002 namespace Catch {
8051 } // end namespace Catch
8056 namespace Catch {
8185 } // end namespace Catch
8188 namespace Catch {
8255 throw Catch::TestFailureException();
8266 m_resultCapture.handleUnexpectedInflightException( m_assertionInfo, Catch::translateActiveException(), m_reaction );
8290 } // namespace Catch
8294 namespace Catch {
8318 return Catch::isOk( m_resultData.resultType );
8323 return Catch::isOk( m_resultData.resultType ) || shouldSuppressFailure( m_info.resultDisposition );
8387 } // end namespace Catch
8391 namespace Catch {
8399 std::string exceptionMessage = Catch::translateActiveException();
8404 } // namespace Catch
8412 // Use Catch's value for console width (store Clara's off to the side, if present)
8475 namespace Catch {
8805 namespace Catch { namespace clara {
9679 }} // namespace Catch::clara
9693 namespace Catch {
9697 } // end namespace Catch
9703 namespace Catch {
9914 } // end namespace Catch
9921 namespace Catch {
9952 namespace Catch {
10023 return Catch::makeStream(m_data.outputFilename);
10026 } // end namespace Catch
10037 namespace Catch {
10082 namespace Catch {
10100 } // namespace Catch
10112 namespace Catch {
10173 } // end namespace Catch
10179 namespace Catch {
10185 // https://github.com/philsquared/Catch/pull/131
10249 } // end namespace Catch
10253 namespace Catch {
10257 } // end namespace Catch
10261 namespace Catch {
10291 } // end namespace Catch
10300 namespace Catch {
10365 namespace Catch {
10373 namespace Catch {
10375 __android_log_write( ANDROID_LOG_DEBUG, "Catch", text.c_str() );
10381 namespace Catch {
10389 namespace Catch {
10392 Catch::cout() << text;
10414 namespace Catch {
10443 Catch::cerr() << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << std::endl;
10457 } // namespace Catch
10463 namespace Catch{
10488 } // namespace Catch
10491 namespace Catch {
10498 namespace Catch {
10504 namespace Catch {
10511 namespace Catch {
10529 namespace Catch {
10533 Catch::cerr() << "Catch will terminate because it needed to throw an exception.\n"
10554 } // namespace Catch;
10562 namespace Catch {
10579 } // Catch
10586 namespace Catch {
10630 const auto valueNames = Catch::Detail::parseEnums( allValueNames );
10645 } // Catch
10652 namespace Catch {
10665 namespace Catch {
10684 namespace Catch {
10702 return Catch::Detail::stringify( [exception description] );
10762 namespace Catch {
10771 } // end namespace Catch
10784 Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message );
10797 namespace Catch {
10834 Catch::cerr()
10859 } // end namespace Catch
10867 namespace Catch {
10962 } // end namespace Catch
10971 namespace Catch {
10988 } // namespace Catch
10992 namespace Catch {
10998 namespace Catch {
11004 namespace Catch {
11011 namespace Catch {
11020 namespace Catch {
11069 } // end namespace Catch
11072 namespace Catch {
11172 } // end namespace Catch
11176 namespace Catch {
11182 namespace Catch {
11192 namespace Catch {
11208 Catch::LeakDetector::LeakDetector() {}
11212 Catch::LeakDetector::~LeakDetector() {
11213 Catch::cleanUp();
11222 namespace Catch {
11242 } // end namespace Catch
11247 namespace Catch {
11256 namespace Catch {
11261 Catch::cout() << "Matching test cases:\n";
11263 Catch::cout() << "All available test cases:\n";
11273 Catch::cout() << Column( testCaseInfo.name ).initialIndent( 2 ).indent( 4 ) << "\n";
11275 Catch::cout() << Column( Catch::Detail::stringify( testCaseInfo.lineInfo ) ).indent(4) << std::endl;
11279 Catch::cout() << Column( description ).indent(4) << std::endl;
11282 Catch::cout() << Column( testCaseInfo.tagsAsString() ).indent( 6 ) << "\n";
11286 Catch::cout() << pluralise( matchedTestCases.size(), "test case" ) << '\n' << std::endl;
11288 Catch::cout() << pluralise( matchedTestCases.size(), "matching test case" ) << '\n' << std::endl;
11299 Catch::cout() << '"' << testCaseInfo.name << '"';
11301 Catch::cout() << testCaseInfo.name;
11303 Catch::cout() << "\t@" << testCaseInfo.lineInfo;
11304 Catch::cout() << std::endl;
11333 Catch::cout() << "Tags for matching test cases:\n";
11335 Catch::cout() << "All available tags:\n";
11359 Catch::cout() << str << wrapper << '\n';
11361 Catch::cout() << pluralise( tagCounts.size(), "tag" ) << '\n' << std::endl;
11366 Catch::cout() << "Available reporters:\n";
11373 Catch::cout()
11383 Catch::cout() << std::endl;
11401 } // end namespace Catch
11405 namespace Catch {
11423 } // namespace Catch
11427 namespace Catch {
11446 } // namespace Catch
11452 namespace Catch {
11462 namespace Catch {
11473 } // end namespace Catch
11486 namespace Catch {
11507 if (Catch::isnan(lhs) || Catch::isnan(rhs)) {
11540 start = Catch::nextafter(start, direction);
11584 return "is within " + ::Catch::Detail::stringify(m_margin) + " of " + ::Catch::Detail::stringify(m_target);
11657 Catch::ReusableStringStream sstr;
11693 } // namespace Catch
11697 std::string Catch::Matchers::Generic::Detail::finalizeDescription(const std::string& desc) {
11709 namespace Catch {
11782 return "matches " + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? " case sensitively" : " case insensitively");
11805 } // namespace Catch
11811 namespace Catch {
11813 } // end namespace Catch
11819 namespace Catch {
11843 Catch::MessageBuilder::MessageBuilder( StringRef const& macroName,
11941 } // end namespace Catch
11953 namespace Catch {
12048 } // end namespace Catch
12069 namespace Catch {
12083 RedirectedStdOut::RedirectedStdOut() : m_cout( Catch::cout(), m_rss.get() ) {}
12087 : m_cerr( Catch::cerr(), m_rss.get() ),
12088 m_clog( Catch::clog(), m_rss.get() )
12161 Catch::cout() << std::flush;
12165 Catch::cerr() << std::flush;
12166 Catch::clog() << std::flush;
12178 } // namespace Catch
12192 namespace Catch {
12211 } // end namespace Catch
12215 namespace Catch {
12284 namespace Catch {
12330 } // end namespace Catch
12337 namespace Catch {
12366 namespace Catch {
12375 } // end namespace Catch
12380 namespace Catch {
12393 } // end namespace Catch
12401 namespace Catch {
12413 } // end namespace Catch
12418 namespace Catch {
12448 } // namespace Catch
12451 namespace Catch {
12529 } // end namespace Catch
12533 namespace Catch {
12562 namespace Catch {
12578 } // end namespace Catch
12586 namespace Catch {
13101 handleNonExpr(info, Catch::ResultWas::DidntThrowException, reaction);
13170 namespace Catch {
13194 } // end namespace Catch
13198 namespace Catch {
13207 } // end namespace Catch
13215 namespace Catch {
13258 } // end namespace Catch
13265 namespace Catch {
13297 namespace Catch {
13303 auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config);
13310 if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) {
13321 auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners();
13323 multi.addListener(listener->create(Catch::ReporterConfig(config)));
13385 void applyFilenamesAsTags(Catch::IConfig const& config) {
13416 CATCH_TRY { CATCH_INTERNAL_ERROR( "Only one instance of Catch::Session can ever be used" ); }
13429 Catch::cerr() << "Errors occurred during startup!" << '\n';
13435 Catch::cerr() << Column( ex.what() ).indent(2) << '\n';
13445 Catch::cleanUp();
13449 Catch::cout()
13455 Catch::cout()
13458 << std::left << std::setw(16) << "framework: " << "Catch Test\n"
13470 Catch::cerr()
13475 Catch::cerr() << "Run with -? for usage\n" << std::endl;
13518 Catch::cout() << "...waiting for enter/ return before starting" << std::endl;
13523 Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << std::endl;
13577 Catch::cerr() << ex.what() << std::endl;
13583 } // end namespace Catch
13589 namespace Catch {
13613 } // namespace Catch
13618 namespace Catch {
13632 } // end namespace Catch
13644 namespace Catch {
13646 Catch::IStream::~IStream() = default;
13717 CoutStream() : m_os( Catch::cout().rdbuf() ) {}
13814 namespace Catch {
13915 namespace Catch {
13949 } // namespace Catch
13953 namespace Catch {
13959 namespace Catch {
13976 namespace Catch {
14017 } // end namespace Catch
14026 namespace Catch {
14190 } // end namespace Catch
14197 namespace Catch {
14349 } // end namespace Catch
14364 namespace Catch {
14586 } // namespace Catch
14594 namespace Catch {
14627 namespace Catch {
14708 namespace Catch {
14937 } // namespace Catch
14945 namespace Catch {
15003 } // namespace Catch
15021 namespace Catch {
15062 if (Catch::isnan(value)) {
15111 return ::Catch::Detail::stringify(std::string{ str });
15117 return ::Catch::Detail::stringify(std::string{ str });
15124 return ::Catch::Detail::stringify(std::string{ str });
15137 return ::Catch::Detail::stringify(s);
15148 return ::Catch::Detail::stringify(std::wstring{ str });
15155 return ::Catch::Detail::stringify(std::wstring{ str });
15165 return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value));
15170 return ::Catch::Detail::stringify(static_cast<long long>(value));
15173 return ::Catch::Detail::stringify(static_cast<long long>(value));
15185 return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));
15188 return ::Catch::Detail::stringify(static_cast<unsigned long long>(value));
15213 return ::Catch::Detail::stringify(static_cast<unsigned int>(value));
15221 return ::Catch::Detail::stringify(static_cast<signed char>(c));
15224 return ::Catch::Detail::stringify(static_cast<char>(c));
15250 } // end namespace Catch
15259 namespace Catch {
15351 namespace Catch {
15361 } // end namespace Catch
15367 namespace Catch {
15403 namespace Catch {
15445 namespace Catch {
15772 namespace Catch {
15836 } // end namespace Catch
15851 Catch::Colour::Code dimColour() { return Catch::Colour::FileName; }
15860 namespace Catch {
16116 } // end namespace Catch
16135 namespace Catch {
16402 m_os << Catch::getLineOfChars<'-'>() << '\n';
16627 << " is a Catch v" << libraryVersion() << " host application.\n"
16792 } // end namespace Catch
16810 namespace Catch {
17086 } // end namespace Catch
17092 namespace Catch {
17241 } // end namespace Catch
17252 namespace Catch {
17286 m_xml.startElement( "Catch" );
17507 } // end namespace Catch
17514 namespace Catch {
17538 return Catch::Session().run( argc, argv );
17549 Catch::registerTestMethods();
17550 int result = Catch::Session().run( argc, (char**)argv );
17575 #define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ )
17576 #define CATCH_REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )
17578 #define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ )
17579 #define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr )
17580 #define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr )
17582 #define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )
17584 #define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ )
17586 #define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17587 #define CATCH_CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )
17588 #define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CATCH_CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17589 #define CATCH_CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CATCH_CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17590 #define CATCH_CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )
17592 #define CATCH_CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17593 #define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )
17594 #define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
17596 #define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
17598 #define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17601 #define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )
17603 #define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg )
17608 #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )
17617 #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )
17618 #define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17619 #define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17671 #define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ )
17672 #define REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )
17674 #define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ )
17675 #define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr )
17676 #define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr )
17678 #define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr )
17680 #define REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ )
17682 #define CHECK( ... ) INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17683 #define CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ )
17684 #define CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17685 #define CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17686 #define CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ )
17688 #define CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17689 #define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr )
17690 #define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
17692 #define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr )
17694 #define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17697 #define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg )
17699 #define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg )
17704 #define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )
17713 #define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ )
17714 #define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17715 #define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
17772 using Catch::Detail::Approx;
17949 using Catch::Detail::Approx;