]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/lightweight_test_gt_ge_test.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / core / test / lightweight_test_gt_ge_test.cpp
1 //
2 // Test for BOOST_TEST_GT, BOOST_TEST_GE
3 //
4 // Copyright 2017 Kohei Takahashi
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt
9 //
10
11 #include <boost/core/lightweight_test.hpp>
12
13 int main()
14 {
15 int x = 0;
16
17 BOOST_TEST_GT( x, -1 );
18 BOOST_TEST_GT( ++x, 0 );
19 BOOST_TEST_GT( x++, 0 );
20
21 BOOST_TEST_GE( x, 2 );
22 BOOST_TEST_GE( ++x, 3 );
23 BOOST_TEST_GE( x++, 3 );
24
25 int y = 5;
26
27 BOOST_TEST_GT( ++y, ++x );
28 BOOST_TEST_GT( y++, x++ );
29
30 BOOST_TEST_GE( ++y, x );
31 BOOST_TEST_GE( y++, x++ );
32
33 return boost::report_errors();
34 }