• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //  (C) Copyright Gennadiy Rozental 2005-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 // Boost.Test
9 #ifndef BOOST_TEST_DYN_LINK
10 #define BOOST_TEST_DYN_LINK
11 #endif
12 #include <boost/test/unit_test.hpp>
13 using namespace boost::unit_test;
14 
15 //____________________________________________________________________________//
16 
BOOST_AUTO_TEST_CASE(test1)17 BOOST_AUTO_TEST_CASE( test1 )
18 {
19     int i = 0;
20 
21     BOOST_CHECK_EQUAL( i, 2 );
22 }
23 
24 //____________________________________________________________________________//
25 
BOOST_AUTO_TEST_CASE(test2)26 BOOST_AUTO_TEST_CASE( test2 )
27 {
28     BOOST_TEST_CHECKPOINT("About to force division by zero!");
29     int i = 1, j = 0;
30 
31     i = i / j;
32 }
33 
34 //____________________________________________________________________________//
35 
36 extern "C" {
37 
38 #ifdef BOOST_WINDOWS
39 __declspec(dllexport)
40 #endif
41 bool
init_unit_test()42 init_unit_test()
43 {
44     framework::master_test_suite().p_name.value = "Test runner test";
45 
46     return true;
47 }
48 
49 }
50 
51 //____________________________________________________________________________//
52 
53 // EOF
54