test_equal.cxx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // (C) Copyright Edward Diener 2011-2015
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. #include <boost/vmd/equal.hpp>
  6. #include <boost/vmd/not_equal.hpp>
  7. #include <boost/detail/lightweight_test.hpp>
  8. int main()
  9. {
  10. #if BOOST_PP_VARIADICS
  11. #define BOOST_VMD_REGISTER_ggh (ggh)
  12. #define BOOST_VMD_DETECT_ggh_ggh
  13. #define BOOST_VMD_REGISTER_dvd (dvd)
  14. #define BOOST_VMD_DETECT_dvd_dvd
  15. #define ANIDENTIFIER ggh
  16. #define ANUMBER 249
  17. #define ANUMBER2 17
  18. #define ASEQ (25)(26)(27)
  19. #define ASEQ2 (1)(2)(3)
  20. #define ATUPLE (0,(ggh,45,(2,(89,(dvd)(57)(99)))),170)
  21. #define ALIST (0,(1,(2,(3,BOOST_PP_NIL))))
  22. #define ALIST2 (0,(1,(2,(4,BOOST_PP_NIL))))
  23. #define ANARRAY (3,(ggh,dvd,38))
  24. #define ANARRAY2 (3,(dvd,ggh,38))
  25. #define ASEQUENCE4
  26. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ASEQ,249));
  27. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ALIST,17));
  28. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ANIDENTIFIER,ANARRAY));
  29. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ANUMBER2,dvd));
  30. BOOST_TEST(BOOST_VMD_EQUAL(ASEQUENCE4,));
  31. BOOST_TEST(BOOST_VMD_EQUAL(,));
  32. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ANARRAY2,ASEQ2));
  33. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ASEQ,22));
  34. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ATUPLE,ANARRAY));
  35. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ALIST2,ANUMBER2));
  36. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ANARRAY,ASEQUENCE4));
  37. #else
  38. BOOST_ERROR("No variadic macro support");
  39. #endif
  40. return boost::report_errors();
  41. }