]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/endian/test/packed_arithmetic_test.cpp
1 // Copyright 2020 Peter Dimov
2 // Distributed under the Boost Software License, Version 1.0.
3 // https://www.boost.org/LICENSE_1_0.txt
7 #include <boost/config/pragma_message.hpp>
8 BOOST_PRAGMA_MESSAGE( "Skipping test because __GNUC__ is not defined" )
13 #define BOOST_ENDIAN_FORCE_PODNESS
14 #define BOOST_ENDIAN_NO_CTORS
15 #include <boost/endian/arithmetic.hpp>
16 #include <boost/core/lightweight_test.hpp>
18 using namespace boost::endian
;
25 } __attribute__((packed
));
29 BOOST_TEST_EQ( sizeof(big_uint16_t
), 2 );
30 BOOST_TEST_EQ( sizeof(native_float64_t
), 8 );
31 BOOST_TEST_EQ( sizeof(little_uint16_t
), 2 );
33 BOOST_TEST_EQ( sizeof(X
), 12 );
35 return boost::report_errors();