2012-02-15 09:20:06 +01:00
|
|
|
/*
|
|
|
|
* Created by Phil on 14/02/2012.
|
|
|
|
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
|
|
|
|
*
|
|
|
|
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define CATCH_CONFIG_MAIN
|
|
|
|
#include "catch_self_test.hpp"
|
|
|
|
|
2012-05-04 08:55:11 +02:00
|
|
|
namespace Catch{
|
|
|
|
|
2012-12-01 10:13:36 +01:00
|
|
|
NullStreamingReporter::~NullStreamingReporter() {}
|
|
|
|
|
2013-01-13 22:51:44 +01:00
|
|
|
Totals EmbeddedRunner::runMatching( const std::string& rawTestSpec, std::size_t groupIndex, std::size_t groupsCount, const std::string& ) {
|
2012-02-15 09:20:06 +01:00
|
|
|
std::ostringstream oss;
|
2013-05-28 19:39:32 +02:00
|
|
|
Ptr<Config> config = new Config();
|
|
|
|
config->setStreamBuf( oss.rdbuf() );
|
2012-05-04 08:55:11 +02:00
|
|
|
|
2012-08-15 20:12:51 +02:00
|
|
|
Totals totals;
|
|
|
|
|
2013-06-05 09:18:52 +02:00
|
|
|
// Scoped because RunContext doesn't report EndTesting until its destructor
|
2012-02-15 09:20:06 +01:00
|
|
|
{
|
2013-06-05 09:18:52 +02:00
|
|
|
RunContext runner( config.get(), m_reporter.get() );
|
2013-01-13 22:51:44 +01:00
|
|
|
totals = runner.runMatching( rawTestSpec, groupIndex, groupsCount );
|
2012-02-15 09:20:06 +01:00
|
|
|
}
|
2012-08-15 20:12:51 +02:00
|
|
|
return totals;
|
2012-02-15 09:20:06 +01:00
|
|
|
}
|
2012-05-04 08:55:11 +02:00
|
|
|
|
2012-02-15 19:36:36 +01:00
|
|
|
}
|