• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //  (C) Copyright Gennadiy Rozental 2001-2014.
2 //  Distributed under the Boost Software License, Version 1.0.
3 //  (See accompanying file LICENSE_1_0.txt or copy at
4 //  http://www.boost.org/LICENSE_1_0.txt)
5 
6 //  See http://www.boost.org/libs/test for the library home page.
7 //
8 // ***************************************************************************
9 
10 #ifndef BOOST_TEST_DYN_LINK
11 #define BOOST_TEST_DYN_LINK
12 #endif
13 #include <boost/test/unit_test.hpp>
14 #include <boost/bind/bind.hpp>
15 using namespace boost::unit_test;
16 
17 //____________________________________________________________________________//
18 
free_test_function(int i,int j)19 void free_test_function( int i, int j )
20 {
21     BOOST_TEST( i == j );
22 }
23 
24 //____________________________________________________________________________//
25 
26 bool
init_function()27 init_function()
28 {
29     framework::master_test_suite().
30         add( BOOST_TEST_CASE( boost::bind( &free_test_function, 1, 1 ) ) );
31     framework::master_test_suite().
32         add( BOOST_TEST_CASE( boost::bind( &free_test_function, 1, 2 ) ) );
33     framework::master_test_suite().
34         add( BOOST_TEST_CASE( boost::bind( &free_test_function, 2, 1 ) ) );
35 
36     // do your own initialization here
37     // if it successful return true
38 
39     // But, you CAN'T use testing tools here
40 
41     return true;
42 }
43 
44 //____________________________________________________________________________//
45 
46 int
main(int argc,char * argv[])47 main( int argc, char* argv[] )
48 {
49     return ::boost::unit_test::unit_test_main( &init_function, argc, argv );
50 }
51 
52 //____________________________________________________________________________//
53