Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_test_registry.cpp
Go to the documentation of this file.
1/*
2 * Created by Martin on 25/07/2017.
3 *
4 * Distributed under the Boost Software License, Version 1.0. (See accompanying
5 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 */
7
12
13namespace Catch {
14
15 auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker* {
16 return new(std::nothrow) TestInvokerAsFunction( testAsFunction );
17 }
18
19 NameAndTags::NameAndTags( StringRef const& name_ , StringRef const& tags_ ) noexcept : name( name_ ), tags( tags_ ) {}
20
21 AutoReg::AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept {
22 CATCH_TRY {
26 invoker,
27 extractClassName( classOrMethod ),
28 nameAndTags,
29 lineInfo));
31 // Do not throw when constructing global objects, instead register the exception to be processed later
33 }
34 }
35
36 AutoReg::~AutoReg() = default;
37}
#define CATCH_TRY
#define CATCH_CATCH_ALL
std::string name
TestCase makeTestCase(ITestInvoker *_testCase, std::string const &_className, NameAndTags const &nameAndTags, SourceLineInfo const &_lineInfo)
IMutableRegistryHub & getMutableRegistryHub()
std::string extractClassName(StringRef const &classOrQualifiedMethodName)
auto makeTestInvoker(void(*testAsFunction)()) noexcept -> ITestInvoker *
AutoReg(ITestInvoker *invoker, SourceLineInfo const &lineInfo, StringRef const &classOrMethod, NameAndTags const &nameAndTags) noexcept
virtual void registerTest(TestCase const &testInfo)=0
virtual void registerStartupException() noexcept=0
NameAndTags(StringRef const &name_=StringRef(), StringRef const &tags_=StringRef()) noexcept