2012-02-15 03:20:06 -05: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)
|
|
|
|
*/
|
|
|
|
|
2012-08-16 13:47:41 -04:00
|
|
|
#ifdef __clang__
|
2012-08-13 02:46:10 -04:00
|
|
|
#pragma clang diagnostic ignored "-Wpadded"
|
2012-08-16 13:47:41 -04:00
|
|
|
#endif
|
2012-08-13 02:46:10 -04:00
|
|
|
|
2012-02-15 03:20:06 -05:00
|
|
|
#define CATCH_CONFIG_MAIN
|
|
|
|
#include "catch_self_test.hpp"
|
|
|
|
|
2012-05-04 02:55:11 -04:00
|
|
|
namespace Catch{
|
|
|
|
|
2012-12-01 04:13:36 -05:00
|
|
|
NullStreamingReporter::~NullStreamingReporter() {}
|
|
|
|
|
2012-08-15 14:12:51 -04:00
|
|
|
Totals EmbeddedRunner::runMatching( const std::string& rawTestSpec, const std::string& ) {
|
2012-02-15 03:20:06 -05:00
|
|
|
std::ostringstream oss;
|
|
|
|
Config config;
|
|
|
|
config.setStreamBuf( oss.rdbuf() );
|
2012-05-04 02:55:11 -04:00
|
|
|
|
2012-08-15 14:12:51 -04:00
|
|
|
Totals totals;
|
|
|
|
|
2012-02-15 03:20:06 -05:00
|
|
|
// Scoped because Runner doesn't report EndTesting until its destructor
|
|
|
|
{
|
2012-12-01 04:13:36 -05:00
|
|
|
Runner runner( config, m_reporter.get() );
|
2012-08-15 14:12:51 -04:00
|
|
|
totals = runner.runMatching( rawTestSpec );
|
2012-02-15 03:20:06 -05:00
|
|
|
}
|
2012-08-15 14:12:51 -04:00
|
|
|
return totals;
|
2012-02-15 03:20:06 -05:00
|
|
|
}
|
2012-05-04 02:55:11 -04:00
|
|
|
|
2012-02-15 13:36:36 -05:00
|
|
|
}
|