]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/atomic/test/ipc_atomic_api.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / atomic / test / ipc_atomic_api.cpp
CommitLineData
20effc67
TL
1// Copyright (c) 2020 Andrey Semashev
2//
3// Distributed under the Boost Software License, Version 1.0.
4// See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7#include <boost/atomic/ipc_atomic.hpp>
8#include <boost/atomic/ipc_atomic_flag.hpp>
9#include <boost/atomic/capabilities.hpp>
10
11#include <boost/config.hpp>
12#include <boost/cstdint.hpp>
13
1e59de90 14#include "atomic_wrapper.hpp"
20effc67
TL
15#include "api_test_helpers.hpp"
16
17int main(int, char *[])
18{
19#if BOOST_ATOMIC_FLAG_LOCK_FREE == 2
20 test_flag_api< boost::ipc_atomic_flag >();
21#endif
22
23 test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint8_t >();
24 test_lock_free_integral_api< ipc_atomic_wrapper, boost::int8_t >();
25
26 test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint16_t >();
27 test_lock_free_integral_api< ipc_atomic_wrapper, boost::int16_t >();
28
29 test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint32_t >();
30 test_lock_free_integral_api< ipc_atomic_wrapper, boost::int32_t >();
31
32 test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint64_t >();
33 test_lock_free_integral_api< ipc_atomic_wrapper, boost::int64_t >();
34
35#if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128)
36 test_lock_free_integral_api< ipc_atomic_wrapper, boost::int128_type >();
37 test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint128_type >();
38#endif
39
40#if !defined(BOOST_ATOMIC_NO_FLOATING_POINT)
41 test_lock_free_floating_point_api< ipc_atomic_wrapper, float >();
42 test_lock_free_floating_point_api< ipc_atomic_wrapper, double >();
43 test_lock_free_floating_point_api< ipc_atomic_wrapper, long double >();
44#if defined(BOOST_HAS_FLOAT128) && !defined(BOOST_ATOMIC_TESTS_NO_FLOAT128)
45 test_lock_free_floating_point_api< ipc_atomic_wrapper, boost::float128_type >();
46#endif
47#endif
48
49 test_lock_free_pointer_api< ipc_atomic_wrapper, int >();
50
51 test_lock_free_enum_api< ipc_atomic_wrapper >();
52
53 return boost::report_errors();
54}