Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/TestMain.cpp
diff options
context:
space:
mode:
authorPhil Nash2012-05-16 15:02:51 +0100
committerPhil Nash2012-05-16 15:02:51 +0100
commitee18b8c507aa14f3bfcb88cf847d0466a0d6908e (patch)
tree4ed77fb4a97f513c1f286be73b45a0acd44bf070 /projects/SelfTest/TestMain.cpp
parent0afa09f7c1261bad88661275a10211f524d8deb1 (diff)
downloadcatch3-ee18b8c507aa14f3bfcb88cf847d0466a0d6908e.tar.gz
Reformatting
Diffstat (limited to 'projects/SelfTest/TestMain.cpp')
-rw-r--r--projects/SelfTest/TestMain.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp
index 97bdb6a2..530cc9ca 100644
--- a/projects/SelfTest/TestMain.cpp
+++ b/projects/SelfTest/TestMain.cpp
@@ -1,55 +1,44 @@
/*
- * main.cpp
- * Catch - Test
- *
* Created by Phil on 22/10/2010.
* Copyright 2010 Two Blue Cubes Ltd
*
* 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)
- *
*/
-
#include "catch_self_test.hpp"
-TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" )
-{
+TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" ) {
using namespace Catch;
///////////////////////////////////////////////////////////////////////////
SECTION( "selftest/expected result",
- "Tests do what they claim" )
- {
+ "Tests do what they claim" ) {
+
SECTION( "selftest/expected result/failing tests",
- "Tests in the 'failing' branch fail" )
- {
+ "Tests in the 'failing' branch fail" ) {
MetaTestRunner::runMatching( "./failing/*", MetaTestRunner::Expected::ToFail );
}
SECTION( "selftest/expected result/succeeding tests",
- "Tests in the 'succeeding' branch succeed" )
- {
+ "Tests in the 'succeeding' branch succeed" ) {
MetaTestRunner::runMatching( "./succeeding/*", MetaTestRunner::Expected::ToSucceed );
}
}
///////////////////////////////////////////////////////////////////////////
SECTION( "selftest/test counts",
- "Number of test cases that run is fixed" )
- {
+ "Number of test cases that run is fixed" ) {
EmbeddedRunner runner;
SECTION( "selftest/test counts/succeeding tests",
- "Number of 'succeeding' tests is fixed" )
- {
+ "Number of 'succeeding' tests is fixed" ) {
runner.runMatching( "./succeeding/*" );
CHECK( runner.getTotals().assertions.passed == 276 );
CHECK( runner.getTotals().assertions.failed == 0 );
}
SECTION( "selftest/test counts/failing tests",
- "Number of 'failing' tests is fixed" )
- {
+ "Number of 'failing' tests is fixed" ) {
runner.runMatching( "./failing/*" );
CHECK( runner.getTotals().assertions.passed == 0 );
CHECK( runner.getTotals().assertions.failed == 71 );
@@ -57,12 +46,10 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results"
}
}
-TEST_CASE( "meta/Misc/Sections", "looped tests" )
-{
+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 );
-
}