queso-0.51.1
TestExample.C
Go to the documentation of this file.
1 #define BOOST_TEST_MODULE
2 #include <boost/test/included/unit_test.hpp>
3 
4 int add( int i, int j ) { return i+j; }
5 int mult( int i, int j ) { return i*j; }
6 
7 BOOST_AUTO_TEST_CASE( simple_test_add )
8 {
9  BOOST_CHECK( add( 2,2 ) == 4 ); // continues on error
10  BOOST_REQUIRE( add( 2,2 ) == 4 ); // throws on error
11 }
12 
13 BOOST_AUTO_TEST_CASE( simple_test_mult )
14 {
15  BOOST_CHECK( mult( 2,2 ) == 4 ); // continues on error
16  BOOST_REQUIRE( mult( 2,2 ) == 4 ); // throws on error
17 }
BOOST_AUTO_TEST_CASE(simple_test_add)
Definition: TestExample.C:7
int mult(int i, int j)
Definition: TestExample.C:5
int add(int i, int j)
Definition: TestExample.C:4

Generated on Thu Apr 23 2015 19:26:16 for queso-0.51.1 by  doxygen 1.8.5