]>
git.proxmox.com Git - ceph.git/blob - 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)
6 // See http://www.boost.org/libs/test for the library home page.
9 #define BOOST_TEST_MODULE tolerance_01
10 #include <boost/test/included/unit_test.hpp>
11 namespace utf
= boost::unit_test
;
13 BOOST_AUTO_TEST_CASE(test1
, * utf::tolerance(0.00001))
15 double x
= 10.0000000;
16 double y
= 10.0000001;
18 BOOST_TEST(x
== y
); // irrelevant difference
19 BOOST_TEST(x
== z
); // relevant difference