• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/equal.hpp>
8 #include <boost/vmd/not_equal.hpp>
9 #include <boost/detail/lightweight_test.hpp>
10 
main()11 int main()
12   {
13 
14 #if BOOST_PP_VARIADICS
15 
16   #define BOOST_VMD_REGISTER_ggh (ggh)
17   #define BOOST_VMD_DETECT_ggh_ggh
18   #define BOOST_VMD_REGISTER_dvd (dvd)
19   #define BOOST_VMD_DETECT_dvd_dvd
20 
21   #define ATUPLE (0,(ggh,45,(2,(89,(dvd)(57)(99)))),170)
22   #define ATUPLE2 (0,(ggh,45,(2,(89,(dvd)(57)(99)))),170)
23   #define ATUPLE3 (0,(ggh,45,(2,(89,(ggh)(57)(99)))),170)
24   #define ATUPLE4 (0,1,(2,3,4,(5,6,7,8)))
25   #define ATUPLE5 (0,1,(2,3,4,(5,6,7,8)))
26   #define ATUPLE6 (0,1,(2,3,4,(5,6,7,9)))
27   #define ATUPLE7 (2,(3,4))
28   #define ATUPLE8 (2,(3,4))
29   #define ATUPLE9 (ggh,(3,BOOST_PP_NIL))
30   #define ATUPLE10 (ggh,(3,BOOST_PP_NIL))
31   #define ASEQ (ggh)(1)
32   #define ASEQ2 (ggh)(1)
33 
34   BOOST_TEST(BOOST_VMD_EQUAL(ATUPLE,ATUPLE2,BOOST_VMD_TYPE_TUPLE));
35   BOOST_TEST(BOOST_VMD_EQUAL(ATUPLE4,ATUPLE5,BOOST_VMD_TYPE_TUPLE));
36   BOOST_TEST(BOOST_VMD_EQUAL(ATUPLE7,ATUPLE8,BOOST_VMD_TYPE_TUPLE));
37   BOOST_TEST(BOOST_VMD_EQUAL(ATUPLE9,ATUPLE10,BOOST_VMD_TYPE_TUPLE));
38   BOOST_TEST(BOOST_VMD_NOT_EQUAL(ATUPLE2,ATUPLE3,BOOST_VMD_TYPE_TUPLE));
39   BOOST_TEST(BOOST_VMD_NOT_EQUAL(ATUPLE4,ATUPLE6,BOOST_VMD_TYPE_TUPLE));
40   BOOST_TEST(BOOST_VMD_NOT_EQUAL(ASEQ,ASEQ2,BOOST_VMD_TYPE_TUPLE));
41 
42 #else
43 
44 BOOST_ERROR("No variadic macro support");
45 
46 #endif
47 
48   return boost::report_errors();
49 
50   }
51