mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 07:29:25 +00:00
Separated getting test cases to run from running them
This commit is contained in:
parent
d0a5461add
commit
c1dbc9c22b
9 changed files with 92 additions and 80 deletions
|
@ -13,21 +13,20 @@
|
|||
|
||||
namespace Catch{
|
||||
|
||||
std::size_t EmbeddedRunner::runMatching( const std::string& rawTestSpec, const std::string& ) {
|
||||
Totals EmbeddedRunner::runMatching( const std::string& rawTestSpec, const std::string& ) {
|
||||
std::ostringstream oss;
|
||||
Config config;
|
||||
config.setStreamBuf( oss.rdbuf() );
|
||||
|
||||
std::size_t result;
|
||||
|
||||
Totals totals;
|
||||
|
||||
// Scoped because Runner doesn't report EndTesting until its destructor
|
||||
{
|
||||
Runner runner( config, m_reporter.get() );
|
||||
result = runner.runMatching( rawTestSpec );
|
||||
m_totals = runner.getTotals();
|
||||
totals = runner.runMatching( rawTestSpec );
|
||||
}
|
||||
m_output = oss.str();
|
||||
return result;
|
||||
return totals;
|
||||
}
|
||||
|
||||
void MockReporter::Result( const ResultInfo& resultInfo ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue