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

summaryrefslogtreecommitdiffhomepage
path: root/Test/TestMain.cpp
blob: 0e84c8f3d977b34e0146f0bad6284143d70a42b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 *  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_with_main.hpp"

#include "../internal/catch_self_test.hpp"

TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" )
{
    using namespace Catch;
    
    EmbeddedRunner runner;

    runner.runMatching( "./succeeding/*" );
    CHECK( runner.getReporter().getSucceeded() == 196 );
    CHECK( runner.getReporter().getFailed() == 0 );

    runner.runMatching( "./failing/*" );        
    CHECK( runner.getReporter().getSucceeded() == 0 );
    CHECK( runner.getReporter().getFailed() == 53 );
}