2010-11-10 00:24:00 +01:00
|
|
|
/*
|
|
|
|
* 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)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-01-18 20:52:19 +01:00
|
|
|
#include "../catch_with_main.hpp"
|
2010-11-10 00:24:00 +01:00
|
|
|
|
2011-01-19 09:52:25 +01:00
|
|
|
#include "../internal/catch_self_test.hpp"
|
|
|
|
|
2011-01-14 09:38:46 +01:00
|
|
|
TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" )
|
2010-11-10 00:24:00 +01:00
|
|
|
{
|
|
|
|
using namespace Catch;
|
2010-11-11 08:30:44 +01:00
|
|
|
|
2011-01-14 17:21:11 +01:00
|
|
|
EmbeddedRunner runner;
|
2011-01-14 09:38:46 +01:00
|
|
|
|
2011-01-14 17:21:11 +01:00
|
|
|
runner.runMatching( "./succeeding/*" );
|
2011-02-09 10:08:10 +01:00
|
|
|
INFO( runner.getOutput() );
|
|
|
|
CHECK( runner.getSuccessCount() == 196 );
|
|
|
|
CHECK( runner.getFailureCount() == 0 );
|
2010-11-29 20:40:44 +01:00
|
|
|
|
2011-01-18 10:20:06 +01:00
|
|
|
runner.runMatching( "./failing/*" );
|
2011-02-16 20:02:09 +01:00
|
|
|
INFO( runner.getOutput() );
|
2011-02-09 10:08:10 +01:00
|
|
|
CHECK( runner.getSuccessCount() == 0 );
|
|
|
|
CHECK( runner.getFailureCount() == 53 );
|
2010-11-10 00:24:00 +01:00
|
|
|
}
|