test_equal_seq.cxx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 ASEQ (25)(26)(27)
  16. #define ASEQ2 (1)(2)(3)
  17. #define ASEQ3 (25)(26)(27)
  18. #define ASEQ4 (25)((1)(2)(3)(4)(5))(27)
  19. #define ASEQ5 (25)((1)(2)(4)(4)(5))(27)
  20. #define ASEQ6 (25)((1)(2)(3)(4)(5))(27)
  21. #define ASEQ7 (25)((1)(2)((11,12,13))(ggh)(5))(27)
  22. #define ASEQ8 (25)((1)(2)((11,12,14))(dvd)(5))(27)
  23. #define ASEQ9 (25)((1)(2)((11,12,13))(ggh)(5))(27)
  24. BOOST_TEST(BOOST_VMD_EQUAL(ASEQ,ASEQ3));
  25. BOOST_TEST(BOOST_VMD_EQUAL(ASEQ4,ASEQ6));
  26. BOOST_TEST(BOOST_VMD_EQUAL(ASEQ7,ASEQ9));
  27. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ASEQ,ASEQ2));
  28. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ASEQ4,ASEQ5));
  29. BOOST_TEST(BOOST_VMD_NOT_EQUAL(ASEQ7,ASEQ8));
  30. #else
  31. BOOST_ERROR("No variadic macro support");
  32. #endif
  33. return boost::report_errors();
  34. }