test_exec_example removed

[SVN r33080]
This commit is contained in:
Gennadiy Rozental 2006-02-22 16:40:02 +00:00
parent f1df965343
commit 97b1b57fef
2 changed files with 0 additions and 34 deletions

View File

@ -33,8 +33,6 @@ test-suite "boost_test_examples"
: [ boost-test-example exec_mon_example : run : boost_prg_exec_monitor ]
[ boost-test-example prg_exec_example : run : boost_prg_exec_monitor ]
[ boost-test-example test_exec_example : run : boost_test_exec_monitor ]
[ boost-test-example test_case_template_example : run : boost_unit_test_framework ]
[ boost-test-example unit_test_example_01 : run-fail : boost_unit_test_framework ]

View File

@ -1,32 +0,0 @@
// (C) Copyright Gennadiy Rozental 2001-2005.
// 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)
// See http://www.boost.org/libs/test for the library home page.
// Boost.Test
#include <boost/test/test_exec_monitor.hpp>
int add( int i, int j ) { return i+j; }
int test_main( int, char* [] ) // note the name!
{
// six ways to detect and report the same error:
BOOST_CHECK( add(2,2) == 4 ); // #1 continues on error
BOOST_REQUIRE( add(2,2) == 4 ); // #2 throws on error
if ( add(2,2) != 4 )
BOOST_ERROR( "Ouch..."); // #3 continues on error
if ( add(2,2) != 4 )
BOOST_FAIL( "Ouch..." ); // #4 throws on error
if ( add(2,2) != 4 )
throw "Oops..."; // #5 throws on error
return add(2,2) == 4 ? 0 : 1; // #6 returns error code
}
// EOF