Home
last modified time | relevance | path

Searched refs:Catch (Results 1 – 25 of 435) sorted by relevance

12345678910>>...18

/external/catch2/include/
Dcatch.hpp108 #define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE", Catch::ResultDisposition::Normal…
109 …ALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::…
111 #define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS", Catch::ResultDis…
112 …ype ) INTERNAL_CATCH_THROWS_AS( "CATCH_REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition…
113 …matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_REQUIRE_THROWS_WITH", Catch::ResultDisposition…
115 …RNAL_CATCH_THROWS_MATCHES( "CATCH_REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition…
117 #define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_REQUIRE_NOTHROW", Catch::Resul…
119 #define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK", Catch::ResultDisposition::ContinueOn…
120 …E( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | C…
121 #define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CATCH_CHECKED_IF", Catch::ResultDisposition::Co…
[all …]
/external/catch2/include/internal/
Dcatch_capture.hpp46Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATC…
50 catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \
59 if( Catch::getResultCapture().lastAssertionPassed() )
64 if( !Catch::getResultCapture().lastAssertionPassed() )
77Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATC…
91Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATC…
108Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATC…
130Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catc…
131 …catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catc…
137 …auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_…
[all …]
Dcatch_list.cpp28 namespace Catch { namespace
33 Catch::cout() << "Matching test cases:\n"; in listTests()
35 Catch::cout() << "All available test cases:\n"; in listTests()
45 Catch::cout() << Column( testCaseInfo.name ).initialIndent( 2 ).indent( 4 ) << "\n"; in listTests()
47Catch::cout() << Column( Catch::Detail::stringify( testCaseInfo.lineInfo ) ).indent(4) << std::end… in listTests()
51 Catch::cout() << Column( description ).indent(4) << std::endl; in listTests()
54 Catch::cout() << Column( testCaseInfo.tagsAsString() ).indent( 6 ) << "\n"; in listTests()
58 Catch::cout() << pluralise( matchedTestCases.size(), "test case" ) << '\n' << std::endl; in listTests()
60Catch::cout() << pluralise( matchedTestCases.size(), "matching test case" ) << '\n' << std::endl; in listTests()
71 Catch::cout() << '"' << testCaseInfo.name << '"'; in listTestsNamesOnly()
[all …]
Dcatch_test_registry.h18 namespace Catch {
110 …e{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName )…
120Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMeth…
131Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::te…
142Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CA…
163 …(void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]),…
209 …(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName<Types> ), CATCH_INTERNAL_LIN…
253 …(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINF…
288 …(void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_ty…
337 …(void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_L…
[all …]
Dcatch_tostring.cpp28 namespace Catch { namespace
70 if (Catch::isnan(value)) { in fpToString()
120 return ::Catch::Detail::stringify(std::string{ str }); in convert()
126 return ::Catch::Detail::stringify(std::string{ str }); in convert()
133 return ::Catch::Detail::stringify(std::string{ str }); in convert()
146 return ::Catch::Detail::stringify(s); in convert()
157 return ::Catch::Detail::stringify(std::wstring{ str }); in convert()
164 return ::Catch::Detail::stringify(std::wstring{ str }); in convert()
174 return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value)); in convert()
179 return ::Catch::Detail::stringify(static_cast<long long>(value)); in convert()
[all …]
Dcatch_tostring.h33 namespace Catch {
102 typename std::enable_if<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
113 … typename std::enable_if<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
129 …return ::Catch::StringMaker<typename std::remove_cv<typename std::remove_reference<T>::type>::type… in stringify()
134 … return ::Catch::Detail::stringify(static_cast<typename std::underlying_type<E>::type>(e)); in convertUnknownEnumToString()
140 return ::Catch::StringMaker<T^>::convert(e);
197 return ::Catch::Detail::stringify(std::string{ str });
203 return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });
209 return ::Catch::Detail::stringify(std::string{ reinterpret_cast<char const *>(str) });
284 return ::Catch::Detail::rawMemoryToString(p);
[all …]
Dcatch_session.cpp31 namespace Catch { namespace
37 … auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config); in createReporter()
44 if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) { in makeReporter()
55 auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners(); in makeReporter()
57 multi.addListener(listener->create(Catch::ReporterConfig(config))); in makeReporter()
119 void applyFilenamesAsTags(Catch::IConfig const& config) { in applyFilenamesAsTags()
159 Catch::cerr() << "Errors occurred during startup!" << '\n'; in Session()
165 Catch::cerr() << Column( ex.what() ).indent(2) << '\n'; in Session()
175 Catch::cleanUp(); in ~Session()
179 Catch::cout() in showHelp()
[all …]
Dcatch_section.h18 namespace Catch {
42 …if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInf…
48 …if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInf…
Dcatch_debugger.cpp30 namespace Catch { namespace
59Catch::cerr() << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << … in isDebuggerActive()
79 namespace Catch{ namespace
107 namespace Catch { namespace
114 namespace Catch { namespace
120 namespace Catch { namespace
/external/catch2/projects/SelfTest/UsageTests/
DToStringVector.tests.cpp9 REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" );
11 REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" );
13 REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" );
19 REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" );
21 REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\" }" );
23 REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" );
53 REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" );
55 REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" );
57 REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" );
64 REQUIRE( ::Catch::Detail::stringify(v) == "{ }" );
[all …]
DToStringVariant.tests.cpp24 CHECK( "{ }" == ::Catch::Detail::stringify(type{}) );
26 CHECK( "{ }" == ::Catch::Detail::stringify(value) );
27 CHECK( "{ }" == ::Catch::Detail::stringify(std::get<0>(value)) );
33 CHECK( "0" == ::Catch::Detail::stringify(type{0}) );
39 CHECK( "0.5f" == ::Catch::Detail::stringify(type{0.5f}) );
40 CHECK( "0" == ::Catch::Detail::stringify(type{0}) );
49 CHECK("{valueless variant}" == ::Catch::Detail::stringify(value));
56 CHECK( "\"foo\"" == ::Catch::Detail::stringify(type{"foo"}) );
57 CHECK( "0" == ::Catch::Detail::stringify(type{0}) );
64 CHECK( "0.5f" == ::Catch::Detail::stringify(type{0.5f}) );
[all …]
DToStringWhich.tests.cpp53 namespace Catch { namespace
71 REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_operator )" );
77 REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker<has_maker>" );
83 REQUIRE( ::Catch::Detail::stringify( item ) == "StringMaker<has_maker_and_operator>" );
88 REQUIRE( ::Catch::Detail::stringify(item) == "{ !!! }" );
94 REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" );
102 REQUIRE( ::Catch::Detail::stringify( v ) == "{ operator<<( has_operator ) }" );
107 REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker> }" );
112 REQUIRE( ::Catch::Detail::stringify( v ) == "{ StringMaker<has_maker_and_operator> }" );
158 namespace Catch { namespace
[all …]
DToStringGeneral.tests.cpp63 REQUIRE( Catch::Detail::stringify( emptyMap ) == "{ }" );
69 REQUIRE( Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" );
79 …REQUIRE( Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" );
88 REQUIRE( Catch::Detail::stringify( emptySet ) == "{ }" );
94 REQUIRE( Catch::Detail::stringify( set ) == "{ \"one\" }" );
100 REQUIRE( Catch::Detail::stringify( set ) == "{ \"abc\", \"def\", \"ghi\" }" );
107 REQUIRE(Catch::Detail::stringify(singular) == "{ 1 }");
111 REQUIRE(Catch::Detail::stringify(arr) == "{ 3, 2, 1 }");
115 … REQUIRE(Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })");
123 CHECK(Catch::Detail::stringify(view) == R"("abc")");
[all …]
DEnumToString.tests.cpp18 CHECK( ::Catch::Detail::stringify(e0) == "0" );
20 CHECK( ::Catch::Detail::stringify(e1) == "1" );
25 CHECK( ::Catch::Detail::stringify(e0) == "E2{0}" );
27 CHECK( ::Catch::Detail::stringify(e1) == "E2{1}" );
52 CHECK( ::Catch::Detail::stringify(e0) == "0" );
54 CHECK( ::Catch::Detail::stringify(e1) == "1" );
60 CHECK( ::Catch::Detail::stringify(e0) == "E2/V0" );
62 CHECK( ::Catch::Detail::stringify(e1) == "E2/V1" );
65 CHECK( ::Catch::Detail::stringify(e3) == "Unknown enum value 10" );
74 using Catch::Detail::stringify; in CATCH_REGISTER_ENUM()
[all …]
DToStringTuple.tests.cpp9 CHECK( "{ }" == ::Catch::Detail::stringify(type{}) );
11 CHECK( "{ }" == ::Catch::Detail::stringify(value) );
17 CHECK( "{ 0 }" == ::Catch::Detail::stringify(type{0}) );
24 CHECK( "1.2f" == ::Catch::Detail::stringify(float(1.2)) );
25 CHECK( "{ 1.2f, 0 }" == ::Catch::Detail::stringify(type{1.2f,0}) );
31 CHECK( "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) );
38 CHECK( "{ { 42 }, { }, 1.2f }" == ::Catch::Detail::stringify(value) );
45 CHECK( "{ nullptr, 42, \"Catch me\" }" == ::Catch::Detail::stringify(value) );
/external/catch2/projects/SelfTest/IntrospectiveTests/
DTag.tests.cpp15 Catch::TagAliasRegistry registry;
17 registry.add( "[@zzz]", "[one][two]", Catch::SourceLineInfo( "file", 2 ) );
22 registry.add( "[@zzz]", "[one][two]", Catch::SourceLineInfo( "file", 10 ) );
28 using namespace Catch::Matchers;
38 CHECK_THROWS( registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) );
39 …CHECK_THROWS( registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) …
40 …CHECK_THROWS( registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 )…
41 …CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) )…
48 …auto testcase = Catch::makeTestCase(nullptr, "", {"fake test name", "[.magic-tag]"}, CATCH_INTERNA…
49 …REQUIRE_THAT(testcase.tags, Catch::VectorContains(std::string("magic-tag")) && Catch::VectorContai…
[all …]
DInternalBenchmark.tests.cpp57 struct TestChronometerModel : Catch::Benchmark::Detail::ChronometerConcept {
71 auto iterations = Catch::Benchmark::Detail::warmup<counting_clock>();
74 REQUIRE((iterations * rate) > Catch::Benchmark::Detail::warmup_time.count());
75 REQUIRE((end - start) > Catch::Benchmark::Detail::warmup_time);
83 auto res = Catch::Benchmark::Detail::resolution<counting_clock>(static_cast<int>(count));
97 auto res = Catch::Benchmark::Detail::estimate_clock_resolution<counting_clock>(iters);
107 auto meter = Catch::Benchmark::Chronometer{ model, 1 };
108 auto fn = Catch::Benchmark::Detail::BenchmarkFunction{ [&] { in __anon8f9a69590402()
124 auto meter = Catch::Benchmark::Chronometer{ model, 1 };
125 auto fn = Catch::Benchmark::Detail::BenchmarkFunction{ [&](Catch::Benchmark::Chronometer) { in __anon8f9a69590502()
[all …]
DToString.tests.cpp9 using namespace Catch::Matchers;
10 using Catch::Detail::parseEnums;
13 CHECK_THAT( parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) );
17 Equals(std::vector<Catch::StringRef>{"Value1"} ) );
19 Equals( std::vector<Catch::StringRef>{"Value1"} ) );
21 Equals(std::vector<Catch::StringRef>{"Value1"} ) );
26 Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) );
28 Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) );
30 Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) );
36 using namespace Catch::Detail;
DStringManip.tests.cpp11 using Catch::trim; using Catch::StringRef;
29 CHECK(Catch::replaceInPlace(letters, "b", "z"));
33 CHECK(Catch::replaceInPlace(letters, "c", "z"));
37 CHECK(Catch::replaceInPlace(letters, "a", "z"));
41 CHECK(Catch::replaceInPlace(letters, "g", "z"));
45 CHECK(Catch::replaceInPlace(letters, letters, "replaced"));
49 CHECK_FALSE(Catch::replaceInPlace(letters, "x", "z"));
54 CHECK(Catch::replaceInPlace(s, "'", "|'"));
60 using namespace Catch::Matchers;
61 using Catch::splitStringRef;
[all …]
/external/catch2/examples/
D210-Evt-EventListeners.cpp37 void print( std::ostream& os, int const level, std::string const& title, Catch::SourceLineInfo cons… in print()
51 void print( std::ostream& os, int const level, Catch::MessageInfo const& info ) { in print()
58 void print( std::ostream& os, int const level, std::string const& title, std::vector<Catch::Message… in print()
73 void print( std::ostream& os, int const level, std::string const& title, Catch::TestRunInfo const& … in print()
88 void print( std::ostream& os, int const level, std::string const& title, Catch::Counts const& info … in print()
103 void print( std::ostream& os, int const level, std::string const& title, Catch::Totals const& info … in print()
115 void print( std::ostream& os, int const level, std::string const& title, Catch::TestRunStats const&… in print()
149 void print( std::ostream& os, int const level, std::string const& title, Catch::TestCaseInfo const&… in print()
173 void print( std::ostream& os, int const level, std::string const& title, Catch::TestCaseStats const… in print()
188 void print( std::ostream& os, int const level, std::string const& title, Catch::SectionInfo const& … in print()
[all …]
/external/llvm-project/libcxxabi/test/
Dcatch_multi_level_pointer.pass.cpp50 template <class Throw, class Catch>
55 const bool can_convert = test_conversion<Catch>(throw_ptr); in catch_pointer_test()
59 } catch (Catch catch_ptr) { in catch_pointer_test()
60 Catch catch2 = CreatePointer<Catch>()(); in catch_pointer_test()
88 template <class Throw, class Catch, int level, bool first = false>
91 typedef TestTypes<Catch, first> CatchTypes;
123 template <class Throw, class Catch, bool first>
124 struct generate_tests_imp<Throw, Catch, 0, first> {
126 catch_pointer_test<Throw, Catch>(); in operator ()()
130 template <class Throw, class Catch, int level>
[all …]
/external/libcxxabi/test/
Dcatch_multi_level_pointer.pass.cpp51 template <class Throw, class Catch>
56 const bool can_convert = test_conversion<Catch>(throw_ptr); in catch_pointer_test()
60 } catch (Catch catch_ptr) { in catch_pointer_test()
61 Catch catch2 = CreatePointer<Catch>()(); in catch_pointer_test()
89 template <class Throw, class Catch, int level, bool first = false>
92 typedef TestTypes<Catch, first> CatchTypes;
124 template <class Throw, class Catch, bool first>
125 struct generate_tests_imp<Throw, Catch, 0, first> {
127 catch_pointer_test<Throw, Catch>(); in operator ()()
131 template <class Throw, class Catch, int level>
[all …]
/external/catch2/docs/
Dconfiguration.md7 [Prefixing Catch macros](#prefixing-catch-macros)<br>
19 [Overriding Catch's debug break (`-b`)](#overriding-catchs-debug-break--b)<br>
21 Catch is designed to "just work" as much as possible. For most people the only configuration needed…
23 Nonetheless there are still some occasions where finer control is needed. For these occasions Catch
30Catch is header only it still, internally, maintains a distinction between interface headers and h…
36 Brings in various parts of Catch that are required for user defined Reporters and Listeners. This m…
40 ## Prefixing Catch macros
44Catch uses short macro names (e.g. ```TEST_CASE``` and ```REQUIRE```). Occasionally these may conf…
55 When sending output to the terminal, if it detects that it can, Catch will use colourised text. On …
67 Catch formats output intended for the console to fit within a fixed number of characters. This is e…
[all …]
Down-main.md5 [Let Catch take full control of args and config](#let-catch-take-full-control-of-args-and-config)<b…
10 The easiest way to use Catch is to let it supply ```main()``` for you and handle configuring itself…
14 …`` instead. Now you are free to write ```main()``` as normal and call into Catch yourself manually.
18 ## Let Catch take full control of args and config
20 If you just need to have code that executes before and/ or after Catch this is the simplest option.
29 int result = Catch::Session().run( argc, argv );
39 If you still want Catch to process the command line, but you want to programmatically tweak the con…
47 Catch::Session session; // There must be exactly one instance
75 Catch embeds a powerful command line parser called [Clara](https://github.com/philsquared/Clara).
77 so extending Catch's own command line options is now easy.
[all …]
Dtostring.md6 [Catch::StringMaker specialisation](#catchstringmaker-specialisation)<br>
7 [Catch::is_range specialisation](#catchis_range-specialisation)<br>
13 Catch needs to be able to convert types you use in assertions and logging expressions into strings …
14 …pes are supported out of the box but there are two ways that you can tell Catch how to convert you…
29 …espace as your type, or the global namespace, and have it declared before including Catch's header.
31 ## Catch::StringMaker specialisation
32 …ype differently for testing purposes, you can provide a specialization for `Catch::StringMaker<T>`:
35 namespace Catch {
45 ## Catch::is_range specialisation
46 As a fallback, Catch attempts to detect if the type can be iterated
[all …]

12345678910>>...18