]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/boost_install/test/system/quick.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / tools / boost_install / test / system / quick.cpp
1
2 // Copyright 2017 Peter Dimov.
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 //
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8
9 // See library home page at http://www.boost.org/libs/system
10
11 #include <boost/system/error_code.hpp>
12 #include <boost/core/lightweight_test.hpp>
13 #include <cerrno>
14
15 int main()
16 {
17 boost::system::error_category const & bt = boost::system::generic_category();
18
19 int ev = ENOENT;
20
21 boost::system::error_code bc( ev, bt );
22
23 BOOST_TEST_EQ( bc.value(), ev );
24 BOOST_TEST_EQ( &bc.category(), &bt );
25
26 boost::system::error_condition bn = bt.default_error_condition( ev );
27
28 BOOST_TEST_EQ( bn.value(), ev );
29 BOOST_TEST_EQ( &bn.category(), &bt );
30
31 BOOST_TEST( bt.equivalent( ev, bn ) );
32
33 BOOST_TEST( bc == bn );
34
35 return boost::report_errors();
36 }