test_assert_is_tuple.cxx 1002 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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_is_tuple.hpp>
  6. #include <boost/detail/lightweight_test.hpp>
  7. int main()
  8. {
  9. #if BOOST_PP_VARIADICS
  10. #define A_TUPLE (*,#,zz)
  11. #define A_TUPLE2 (*,#,(zz,44,(e7)))
  12. #define AN_ARRAY (4,(5,7,f,x))
  13. #define A_LIST (e,(g,(&,BOOST_PP_NIL)))
  14. #if !BOOST_VMD_MSVC_V8
  15. #define AN_EMPTY_TUPLE ()
  16. #endif
  17. BOOST_VMD_ASSERT_IS_TUPLE((t,3,e,2))
  18. BOOST_VMD_ASSERT_IS_TUPLE(((y,s,w),3,e,2))
  19. BOOST_VMD_ASSERT_IS_TUPLE(A_TUPLE)
  20. BOOST_VMD_ASSERT_IS_TUPLE(A_TUPLE2)
  21. BOOST_VMD_ASSERT_IS_TUPLE(AN_ARRAY)
  22. BOOST_VMD_ASSERT_IS_TUPLE(A_LIST)
  23. #if !BOOST_VMD_MSVC_V8
  24. BOOST_VMD_ASSERT_IS_TUPLE(())
  25. BOOST_VMD_ASSERT_IS_TUPLE(AN_EMPTY_TUPLE)
  26. #endif
  27. #else
  28. BOOST_VMD_ASSERT(0)
  29. #endif
  30. return boost::report_errors();
  31. }