]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/test/doc/examples/tolerance_01.run-fail.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / test / doc / examples / tolerance_01.run-fail.cpp
1 // Copyright (c) 2015 Boost.Test team
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 tolerance_01
10 #include <boost/test/included/unit_test.hpp>
11 namespace utf = boost::unit_test;
12
13 BOOST_AUTO_TEST_CASE(test1, * utf::tolerance(0.00001))
14 {
15 double x = 10.0000000;
16 double y = 10.0000001;
17 double z = 10.001;
18 BOOST_TEST(x == y); // irrelevant difference
19 BOOST_TEST(x == z); // relevant difference
20 }
21 //]