]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/vmd/test/test_assert_is_identifier.cxx
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / vmd / test / test_assert_is_identifier.cxx
CommitLineData
7c673cae
FG
1
2// (C) Copyright Edward Diener 2011-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/assert_is_identifier.hpp>
8#include <boost/detail/lightweight_test.hpp>
9#include <boost/preprocessor/list/at.hpp>
10#include <boost/preprocessor/seq/elem.hpp>
11#include <boost/preprocessor/tuple/elem.hpp>
12
13int main()
14 {
15
16#if BOOST_PP_VARIADICS
17
18 #define A_TUPLE (*,#,zzz)
19 #define JDATA somevalue
20 #define A_SEQ (num)(%)(#)
21 #define A_LIST (eeb,(grist,(&,BOOST_PP_NIL)))
22
23 #define BOOST_VMD_REGISTER_zzz (zzz)
24 #define BOOST_VMD_DETECT_zzz_zzz
25 #define BOOST_VMD_REGISTER_somevalue (somevalue)
26 #define BOOST_VMD_DETECT_somevalue_somevalue
27 #define BOOST_VMD_REGISTER_num (num)
28 #define BOOST_VMD_DETECT_num_num
29 #define BOOST_VMD_REGISTER_eeb (eeb)
30 #define BOOST_VMD_DETECT_eeb_eeb
31 #define BOOST_VMD_REGISTER_grist (grist)
32 #define BOOST_VMD_DETECT_grist_grist
33
34 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_TUPLE_ELEM(2,A_TUPLE),zzz)
35 BOOST_VMD_ASSERT_IS_IDENTIFIER(JDATA,somevalue)
36 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_SEQ_ELEM(0,A_SEQ),num)
37 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_LIST_AT(A_LIST,0),eeb)
38 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_LIST_AT(A_LIST,1),grist)
39
40#else
41
92f5a8d4 42 BOOST_VMD_ASSERT(0)
7c673cae
FG
43
44#endif
45
46 return boost::report_errors();
47
48 }