]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/vmd/test/test_seq_push_front.cxx
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / vmd / test / test_seq_push_front.cxx
1
2 // (C) Copyright Edward Diener 2015
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
6
7 #include <boost/vmd/seq/push_front.hpp>
8 #include <boost/preprocessor/seq/elem.hpp>
9 #include <boost/preprocessor/seq/size.hpp>
10 #include <boost/detail/lightweight_test.hpp>
11
12 int main()
13 {
14
15 #if BOOST_PP_VARIADICS
16
17 #define A_SEQ (1)(2)(3)(4)
18 #define AN_EMPTY_SEQ
19
20 BOOST_TEST_EQ(BOOST_PP_SEQ_ELEM(0,BOOST_VMD_SEQ_PUSH_FRONT(A_SEQ,10)),10);
21 BOOST_TEST_EQ(BOOST_PP_SEQ_SIZE(BOOST_VMD_SEQ_PUSH_FRONT(A_SEQ,10)),5);
22 BOOST_TEST_EQ(BOOST_PP_SEQ_ELEM(0,BOOST_VMD_SEQ_PUSH_FRONT(AN_EMPTY_SEQ,20)),20);
23 BOOST_TEST_EQ(BOOST_PP_SEQ_SIZE(BOOST_VMD_SEQ_PUSH_FRONT(AN_EMPTY_SEQ,20)),1);
24
25 #else
26
27 BOOST_ERROR("No variadic macro support");
28
29 #endif
30
31 return boost::report_errors();
32
33 }