test_assert_is_seq.cxx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_seq.hpp>
  6. #include <boost/preprocessor/tuple/elem.hpp>
  7. #include <boost/detail/lightweight_test.hpp>
  8. int main()
  9. {
  10. #if BOOST_PP_VARIADICS
  11. #define ATUPLE (0,1,2,3,((VMD_TEST_88_,VMD_TEST_1_))((VMD_TEST_99_,VMD_TEST_3_))((VMD_TEST_2_))((VMD_TEST_99_,VMD_TEST_100_,VMD_TEST_101_)))
  12. #if !BOOST_VMD_MSVC_V8
  13. #define AN_EMPTY_SEQ ()
  14. #endif
  15. BOOST_VMD_ASSERT_IS_SEQ((x))
  16. BOOST_VMD_ASSERT_IS_SEQ((x)(y))
  17. BOOST_VMD_ASSERT_IS_SEQ((x)(y)(z)(2)(3)(4))
  18. BOOST_VMD_ASSERT_IS_SEQ((x)(y)(z)((1,2))(3)(4))
  19. BOOST_VMD_ASSERT_IS_SEQ((x)(y)(z)((1,2))(3)((4,(x,BOOST_PP_NIL))))
  20. BOOST_VMD_ASSERT_IS_SEQ((x)(y)((x)(y)(z)(2)(3)(4))((1,2))(3)((4,(x,BOOST_PP_NIL))))
  21. BOOST_VMD_ASSERT_IS_SEQ(BOOST_PP_TUPLE_ELEM(4,ATUPLE))
  22. #if !BOOST_VMD_MSVC_V8
  23. BOOST_VMD_ASSERT_IS_SEQ(())
  24. BOOST_VMD_ASSERT_IS_SEQ(AN_EMPTY_SEQ)
  25. #endif
  26. #else
  27. BOOST_VMD_ASSERT(0)
  28. #endif
  29. return boost::report_errors();
  30. }