10 #define ELPP_NO_CHECK_MACROS 13 #if defined(CATCH_CONFIG_MAIN) 14 #error CATCH_CONFIG_MAIN must not be defined: to run your own main(), use CATCH_CONFIG_RUNNER with #cmake:custom-main 19 #if defined(CATCH_CONFIG_RUNNER) 25 class CustomRunContext :
public RunContext
28 CustomRunContext( CustomRunContext
const& ) =
delete;
29 CustomRunContext & operator=( CustomRunContext
const& ) =
delete;
32 explicit CustomRunContext( IStreamingReporterPtr&& reporter,
IConfigPtr const&
cfg )
38 explicit CustomRunContext( std::string
const & reporter_type =
"compact",
IConfigPtr const & cfg =
IConfigPtr(
new Config ) )
39 : CustomRunContext(
getRegistryHub().getReporterRegistry().create( reporter_type, cfg ), cfg )
44 explicit CustomRunContext( Catch::ConfigData
const & cfg, std::string
const & reporter_type =
"compact" )
45 : CustomRunContext( reporter_type,
IConfigPtr(
new Config( cfg ) ) )
51 void set_redirection(
bool on )
53 auto r =
dynamic_cast<Catch::CompactReporter *
>(&reporter());
55 r->m_reporterPrefs.shouldRedirectStdOut = on;
65 void invoke()
const override 70 TestCase test_case(
new invoker( test ),
71 TestCaseInfo( name, {}, {}, {}, {
"",0} )
73 return runTest( test_case );
79 #endif // CATCH_CONFIG_RUNNER GLuint const GLchar * name
dispatcher invoke([&](dispatcher::cancellable_timer c) { std::this_thread::sleep_for(std::chrono::seconds(3));dispatched_end_verifier=true;})
def run_test(self, configuration=None, log_path=None, opts=set())
std::function< void(std::function< void()>)> invoker
typename ::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
IRegistryHub const & getRegistryHub()
std::shared_ptr< IConfig const > IConfigPtr