]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/contract/test/constructor/decl_pre_none.cpp
2 // Copyright (C) 2008-2018 Lorenzo Caminiti
3 // Distributed under the Boost Software License, Version 1.0 (see accompanying
4 // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
5 // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
7 // Test all derived and base classes without preconditions.
9 #define BOOST_CONTRACT_TEST_NO_A_PRE
10 #define BOOST_CONTRACT_TEST_NO_B_PRE
11 #define BOOST_CONTRACT_TEST_NO_C_PRE
14 #include <boost/detail/lightweight_test.hpp>
18 std::ostringstream ok
; ok
19 // Test no preconditions here.
21 #ifndef BOOST_CONTRACT_NO_ENTRY_INVARIANTS
22 << "c::static_inv" << std::endl
24 #ifndef BOOST_CONTRACT_NO_OLDS
25 << "c::ctor::old" << std::endl
27 << "c::ctor::body" << std::endl
28 #ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
29 << "c::static_inv" << std::endl
30 << "c::inv" << std::endl
32 #ifndef BOOST_CONTRACT_NO_POSTCONDITIONS
33 << "c::ctor::post" << std::endl
36 #ifndef BOOST_CONTRACT_NO_ENTRY_INVARIANTS
37 << "b::static_inv" << std::endl
39 #ifndef BOOST_CONTRACT_NO_OLDS
40 << "b::ctor::old" << std::endl
42 << "b::ctor::body" << std::endl
43 #ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
44 << "b::static_inv" << std::endl
45 << "b::inv" << std::endl
47 #ifndef BOOST_CONTRACT_NO_POSTCONDITIONS
48 << "b::ctor::post" << std::endl
51 #ifndef BOOST_CONTRACT_NO_ENTRY_INVARIANTS
52 << "a::static_inv" << std::endl
54 #ifndef BOOST_CONTRACT_NO_OLDS
55 << "a::ctor::old" << std::endl
57 << "a::ctor::body" << std::endl
58 #ifndef BOOST_CONTRACT_NO_EXIT_INVARIANTS
59 << "a::static_inv" << std::endl
60 << "a::inv" << std::endl
62 #ifndef BOOST_CONTRACT_NO_POSTCONDITIONS
63 << "a::ctor::post" << std::endl
73 BOOST_TEST(out
.eq(ok
.str()));
82 BOOST_TEST(out
.eq(ok
.str()));
91 BOOST_TEST(out
.eq(ok
.str()));
100 BOOST_TEST(out
.eq(ok
.str()));
109 BOOST_TEST(out
.eq(ok
.str()));
112 return boost::report_errors();