test_assert_fail_identifier.cxx 994 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/assert.hpp>
  6. #include <boost/vmd/elem.hpp>
  7. #include <boost/detail/lightweight_test.hpp>
  8. #include <boost/preprocessor/comparison/equal.hpp>
  9. #include <boost/preprocessor/tuple/elem.hpp>
  10. int main()
  11. {
  12. #if BOOST_PP_VARIADICS
  13. #define A_TUPLE (*,#,zzz ())
  14. #define BOOST_VMD_REGISTER_zzz (zzz)
  15. #define BOOST_VMD_DETECT_zzz_zzz
  16. BOOST_VMD_ASSERT
  17. (
  18. BOOST_PP_EQUAL
  19. (
  20. BOOST_PP_TUPLE_ELEM
  21. (
  22. 2,
  23. BOOST_VMD_ELEM(0,BOOST_PP_TUPLE_ELEM(2,A_TUPLE),(dummy1,zzz),BOOST_VMD_RETURN_AFTER,BOOST_VMD_RETURN_INDEX,BOOST_VMD_TYPE_IDENTIFIER)
  24. ),
  25. 0
  26. ),
  27. BOOST_VMD_TEST_FAIL_IDENTIFIER
  28. )
  29. #endif
  30. return boost::report_errors();
  31. }