2
0
mirror of https://github.com/boostorg/test.git synced 2026-02-01 09:02:08 +00:00
Files
test/doc/v2/examples/example30.cpp
2014-01-28 10:21:07 +01:00

17 lines
281 B
C++
Executable File

//[example30
#define BOOST_TEST_MODULE example
#include <boost/test/included/unit_test.hpp>
bool is_even( int i )
{
return i%2 == 0;
}
BOOST_AUTO_TEST_CASE( test_is_even )
{
BOOST_CHECK_PREDICATE( is_even, (14) );
int i = 17;
BOOST_CHECK_PREDICATE( is_even, (i) );
}
//]