Views
Regression testing
From MCRL2
For testing CDash is used with CTest.
Running and uploading tests
How to run and upload tests can be found here.
Test programs
Test programs must follow a few simple rules that are explained in the Boost Test documentation. In most cases the minimal testing facility will be sufficient. An example is given here:
#include <boost/test/minimal.hpp> int add( int i, int j ) { return i+j; } int test_main( int, char *[] ) { BOOST_CHECK( add( 3,3 ) == 5 ); // continues on error BOOST_CHECK( add( 2,2 ) == 4 ); return 0; }
Note that a function test_main needs to be defined instead of main.
An example of a Jamfile is given below:
import testing ;
project libraries/aterm/test
: requirements
<dependency>/boost//headers
<dependency>/libraries//atermpp
<source>/libraries//aterm
<define>BOOST_ALL_NO_LIB # do not use automatic library selection
;
test-suite mytest
:
[ run test1.cpp ]
[ run test2.cpp ]
;
This page was last modified on 17 December 2009, at 23:09. This page has been accessed 15,880 times.
Copyright © 2005-2010 Technische Universiteit Eindhoven.
Copyright © 2005-2010 Technische Universiteit Eindhoven.
