diff options
| author | Phil Nash | 2012-08-15 19:12:51 +0100 |
|---|---|---|
| committer | Phil Nash | 2012-08-15 19:12:51 +0100 |
| commit | c1dbc9c22bda91b586919333fd0b946450ad3067 (patch) | |
| tree | 9852b52da3fdf398e465cdcb8931ff7666b48e2e /projects/SelfTest/TestMain.cpp | |
| parent | d0a5461addb2997424d14e570b751bc223bff02b (diff) | |
| download | catch3-c1dbc9c22bda91b586919333fd0b946450ad3067.tar.gz | |
Separated getting test cases to run from running them
Diffstat (limited to 'projects/SelfTest/TestMain.cpp')
| -rw-r--r-- | projects/SelfTest/TestMain.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index 324fc28c..4dd59c8f 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -34,16 +34,16 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" SECTION( "selftest/test counts/succeeding tests", "Number of 'succeeding' tests is fixed" ) { - runner.runMatching( "./succeeding/*" ); - CHECK( runner.getTotals().assertions.passed == 285 ); - CHECK( runner.getTotals().assertions.failed == 0 ); + Totals totals = runner.runMatching( "./succeeding/*" ); + CHECK( totals.assertions.passed == 285 ); + CHECK( totals.assertions.failed == 0 ); } SECTION( "selftest/test counts/failing tests", "Number of 'failing' tests is fixed" ) { - runner.runMatching( "./failing/*" ); - CHECK( runner.getTotals().assertions.passed == 0 ); - CHECK( runner.getTotals().assertions.failed == 72 ); + Totals totals = runner.runMatching( "./failing/*" ); + CHECK( totals.assertions.passed == 0 ); + CHECK( totals.assertions.failed == 72 ); } } } @@ -51,9 +51,9 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" TEST_CASE( "meta/Misc/Sections", "looped tests" ) { Catch::EmbeddedRunner runner; - runner.runMatching( "./mixed/Misc/Sections/nested2" ); - CHECK( runner.getTotals().assertions.passed == 2 ); - CHECK( runner.getTotals().assertions.failed == 1 ); + Catch::Totals totals = runner.runMatching( "./mixed/Misc/Sections/nested2" ); + CHECK( totals.assertions.passed == 2 ); + CHECK( totals.assertions.failed == 1 ); } #pragma clang diagnostic ignored "-Wweak-vtables" |