test_assert_is_array.cxx 770 B

1234567891011121314151617181920212223242526272829303132333435
  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_array.hpp>
  6. #include <boost/detail/lightweight_test.hpp>
  7. int main()
  8. {
  9. #if BOOST_PP_VARIADICS
  10. #define AN_ARRAY (7,(5,7,f,x,%,#,U))
  11. #if !BOOST_VMD_MSVC_V8
  12. #define AN_EMPTY_ARRAY (0,())
  13. #endif
  14. BOOST_VMD_ASSERT_IS_ARRAY((4,(x,3,e,2)))
  15. BOOST_VMD_ASSERT_IS_ARRAY((6,(x,3,e,2,(4,(x,3,e,2)),%)))
  16. BOOST_VMD_ASSERT_IS_ARRAY(AN_ARRAY)
  17. #if !BOOST_VMD_MSVC_V8
  18. BOOST_VMD_ASSERT_IS_ARRAY(AN_EMPTY_ARRAY)
  19. #endif
  20. #else
  21. BOOST_VMD_ASSERT(0)
  22. #endif
  23. return boost::report_errors();
  24. }