diff options
| author | Phil Nash | 2011-01-05 21:07:20 +0000 |
|---|---|---|
| committer | Phil Nash | 2011-01-05 21:07:20 +0000 |
| commit | b87a16d11a5910fcdb49e2f849fcd3af5cf029d6 (patch) | |
| tree | c685effd6a35f33feb3968ce3a537e6b050d8838 /Test/TestMain.cpp | |
| parent | 4220fb6267368af16545bc15b0284a540a3d4ac9 (diff) | |
| download | catch3-b87a16d11a5910fcdb49e2f849fcd3af5cf029d6.tar.gz | |
Fixed TestMain after recent refactorings
Diffstat (limited to 'Test/TestMain.cpp')
| -rw-r--r-- | Test/TestMain.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Test/TestMain.cpp b/Test/TestMain.cpp index 7d8c1d5c..53782bca 100644 --- a/Test/TestMain.cpp +++ b/Test/TestMain.cpp @@ -14,7 +14,6 @@ #include "../catch_runner.hpp" // This code runs the meta tests and verifies that the failing ones failed and the successful ones succeeded -///* int main (int argc, char * const argv[]) { using namespace Catch; @@ -26,17 +25,16 @@ int main (int argc, char * const argv[]) std::ostringstream ossSucceeding; std::ostringstream ossFailing; - RunnerConfig config; - ReporterConfig& reporterConfig = config.getReporterConfig(); - config.setReporter( new BasicReporter(reporterConfig ) ); - reporterConfig.setIncludeWhat( ReporterConfig::Include::SuccessfulResults ); + Config config; + config.setReporter( "Basic" ); + config.setIncludeWhat( Config::Include::SuccessfulResults ); Runner runner( config ); - reporterConfig.setStreamBuf( ossSucceeding.rdbuf() ); + config.setStreamBuf( ossSucceeding.rdbuf() ); runner.runMatching( "succeeding/*" ); std::string succeedingResults = ossSucceeding.str(); - reporterConfig.setStreamBuf( ossFailing.rdbuf() ); + config.setStreamBuf( ossFailing.rdbuf() ); runner.runMatching( "failing/*" ); std::string failingResults = ossFailing.str(); @@ -64,7 +62,7 @@ int main (int argc, char * const argv[]) { const size_t expectedTestCaseCount = 106; // !TBD factor this out size_t testCaseCount = runner.getSuccessCount() + runner.getFailureCount(); - std::cout << "All " << testCaseCount << " tests completed successfully" << std::endl; + std::cout << "All " << testCaseCount << " test(s) completed successfully" << std::endl; if( testCaseCount != expectedTestCaseCount ) { std::cerr << "- but we were expecting " << expectedTestCaseCount @@ -76,5 +74,3 @@ int main (int argc, char * const argv[]) } return result; } -//*/ -//#include "catch_default_main.hpp"
\ No newline at end of file |