]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/lightweight_test_test3.cpp
2 // Test for lightweight_test.hpp
4 // Copyright (c) 2014, 2018 Peter Dimov
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
11 #include <boost/core/lightweight_test.hpp>
12 #include <boost/core/noncopyable.hpp>
17 struct eq1
: private boost::noncopyable
{};
18 struct eq2
: private boost::noncopyable
{};
20 std::ostream
& operator<<( std::ostream
& os
, eq1
const& )
25 std::ostream
& operator<<( std::ostream
& os
, eq2
const& )
30 bool operator==( eq1
const&, eq2
const& )
37 struct ne1
: private boost::noncopyable
{};
38 struct ne2
: private boost::noncopyable
{};
40 std::ostream
& operator<<( std::ostream
& os
, ne1
const& )
45 std::ostream
& operator<<( std::ostream
& os
, ne2
const& )
50 bool operator!=( ne1
const&, ne2
const& )
57 struct lt1
: private boost::noncopyable
{};
58 struct lt2
: private boost::noncopyable
{};
60 std::ostream
& operator<<( std::ostream
& os
, lt1
const& )
65 std::ostream
& operator<<( std::ostream
& os
, lt2
const& )
70 bool operator<( lt1
const&, lt2
const& )
77 struct le1
: private boost::noncopyable
{};
78 struct le2
: private boost::noncopyable
{};
80 std::ostream
& operator<<( std::ostream
& os
, le1
const& )
85 std::ostream
& operator<<( std::ostream
& os
, le2
const& )
90 bool operator<=( le1
const&, le2
const& )
97 struct gt1
: private boost::noncopyable
{};
98 struct gt2
: private boost::noncopyable
{};
100 std::ostream
& operator<<( std::ostream
& os
, gt1
const& )
102 return os
<< "gt1()";
105 std::ostream
& operator<<( std::ostream
& os
, gt2
const& )
107 return os
<< "gt2()";
110 bool operator>( gt1
const&, gt2
const& )
117 struct ge1
: private boost::noncopyable
{};
118 struct ge2
: private boost::noncopyable
{};
120 std::ostream
& operator<<( std::ostream
& os
, ge1
const& )
122 return os
<< "ge1()";
125 std::ostream
& operator<<( std::ostream
& os
, ge2
const& )
127 return os
<< "ge2()";
130 bool operator>=( ge1
const&, ge2
const& )
139 BOOST_TEST_EQ( eq1(), eq2() );
140 BOOST_TEST_NE( ne1(), ne2() );
141 BOOST_TEST_LT( lt1(), lt2() );
142 BOOST_TEST_LE( le1(), le2() );
143 BOOST_TEST_GT( gt1(), gt2() );
144 BOOST_TEST_GE( ge1(), ge2() );
146 return boost::report_errors();