queso-0.51.1
Macros | Functions
TestExample.C File Reference
#include <boost/test/included/unit_test.hpp>
Include dependency graph for TestExample.C:

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE
 

Functions

int add (int i, int j)
 
int mult (int i, int j)
 
 BOOST_AUTO_TEST_CASE (simple_test_add)
 
 BOOST_AUTO_TEST_CASE (simple_test_mult)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE

Definition at line 1 of file TestExample.C.

Function Documentation

int add ( int  i,
int  j 
)

Definition at line 4 of file TestExample.C.

Referenced by BOOST_AUTO_TEST_CASE().

4 { return i+j; }
BOOST_AUTO_TEST_CASE ( simple_test_add  )

Definition at line 7 of file TestExample.C.

References add().

8 {
9  BOOST_CHECK( add( 2,2 ) == 4 ); // continues on error
10  BOOST_REQUIRE( add( 2,2 ) == 4 ); // throws on error
11 }
int add(int i, int j)
Definition: TestExample.C:4
BOOST_AUTO_TEST_CASE ( simple_test_mult  )

Definition at line 13 of file TestExample.C.

References mult().

14 {
15  BOOST_CHECK( mult( 2,2 ) == 4 ); // continues on error
16  BOOST_REQUIRE( mult( 2,2 ) == 4 ); // throws on error
17 }
int mult(int i, int j)
Definition: TestExample.C:5
int mult ( int  i,
int  j 
)

Definition at line 5 of file TestExample.C.

Referenced by BOOST_AUTO_TEST_CASE().

5 { return i*j; }

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