1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
// (C) Copyright Edward Diener 2011-2015
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
#include <boost/vmd/equal.hpp>
#include <boost/vmd/not_equal.hpp>
#include <boost/detail/lightweight_test.hpp>
int main()
{
#if BOOST_PP_VARIADICS
#define BOOST_VMD_REGISTER_aaa (aaa)
#define BOOST_VMD_REGISTER_bbb (bbb)
#define BOOST_VMD_REGISTER_ccc (ccc)
#define BOOST_VMD_REGISTER_ddd (ddd)
#define BOOST_VMD_REGISTER_ggh (ggh)
#define BOOST_VMD_REGISTER_dvd (dvd)
#define BOOST_VMD_DETECT_aaa_aaa
#define BOOST_VMD_DETECT_bbb_bbb
#define BOOST_VMD_DETECT_ccc_ccc
#define BOOST_VMD_DETECT_ddd_ddd
#define BOOST_VMD_DETECT_ggh_ggh
#define BOOST_VMD_DETECT_dvd_dvd
#define ALIST (0,(1,(2,(3,BOOST_PP_NIL))))
#define ALIST2 (0,(1,(2,(4,BOOST_PP_NIL))))
#define ALIST3 (0,(1,(2,(3,BOOST_PP_NIL))))
#define ALIST4 (0,(aaa)(ccc),(2,(3,BOOST_PP_NIL)))
#define ALIST5 (0,(aaa)(ccc),(2,(3,BOOST_PP_NIL)))
#define ALIST6 (0,(bbb)(ccc),(2,(3,BOOST_PP_NIL)))
BOOST_TEST(BOOST_VMD_EQUAL(ALIST,ALIST3));
BOOST_TEST(BOOST_VMD_EQUAL(ALIST4,ALIST5));
BOOST_TEST(BOOST_VMD_NOT_EQUAL(ALIST,ALIST2));
BOOST_TEST(BOOST_VMD_NOT_EQUAL(ALIST4,ALIST6));
#else
BOOST_ERROR("No variadic macro support");
#endif
return boost::report_errors();
}
|