2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-27 07:22:11 +00:00
Files
test/doc/v2/examples/example22.cpp
2014-01-27 01:35:49 +01:00

27 lines
667 B
C++
Executable File

//[example22
#define BOOST_TEST_MODULE example
#include <boost/test/included/unit_test.hpp>
//____________________________________________________________________________//
extern void foo( int i );
//____________________________________________________________________________//
BOOST_AUTO_TEST_CASE( test_external_interface )
{
for( int i = 3; i >=0; i-- ) {
BOOST_TEST_CHECKPOINT( "Calling foo with i=" << i );
foo( i );
}
}
//____________________________________________________________________________//
void foo( int i )
{
int j = 2/(i-1);
}
//____________________________________________________________________________//
//]