• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //  (C) Copyright Raffi Enficiaud 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 //[example_code
9 #define BOOST_TEST_MODULE boost_test_macro_overview
10 #include <boost/test/included/unit_test.hpp>
11 
BOOST_AUTO_TEST_CASE(test_macro_overview)12 BOOST_AUTO_TEST_CASE( test_macro_overview )
13 {
14   namespace tt = boost::test_tools;
15   int a = 1;
16   int b = 2;
17   BOOST_TEST(a != b - 1);
18   BOOST_TEST(a + 1 < b);
19   BOOST_TEST(b -1 > a, a << " < " << b - 1 << " does not hold");
20   BOOST_TEST(a == b, tt::bitwise());
21   BOOST_TEST(a + 0.1 == b - 0.8, tt::tolerance(0.01));
22 }
23 //]
24