test_list_empty.cxx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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/is_empty_list.hpp>
  6. #include <boost/detail/lightweight_test.hpp>
  7. int main()
  8. {
  9. #if BOOST_PP_VARIADICS
  10. #define A_LIST_PLUS (mmf,(34,(^^,(!,BOOST_PP_NIL)))) 456
  11. #define PLUS_ALIST yyt (j,(ii%,BOOST_PP_NIL))
  12. #define JDATA ggh
  13. #define KDATA (a,(b,BOOST_PP_NIL)) name
  14. #define A_SEQ ((25,BOOST_PP_NIL))((26,BOOST_PP_NIL))((27,BOOST_PP_NIL))
  15. #define EMPTY_LIST BOOST_PP_NIL
  16. BOOST_TEST(!BOOST_VMD_IS_EMPTY_LIST(anything));
  17. BOOST_TEST(!BOOST_VMD_IS_EMPTY_LIST(A_LIST_PLUS));
  18. BOOST_TEST(!BOOST_VMD_IS_EMPTY_LIST(PLUS_ALIST));
  19. BOOST_TEST(!BOOST_VMD_IS_EMPTY_LIST(JDATA));
  20. BOOST_TEST(!BOOST_VMD_IS_EMPTY_LIST(KDATA));
  21. BOOST_TEST(!BOOST_VMD_IS_EMPTY_LIST(A_SEQ));
  22. BOOST_TEST(BOOST_VMD_IS_EMPTY_LIST(EMPTY_LIST));
  23. #else
  24. BOOST_ERROR("No variadic macro support");
  25. #endif
  26. return boost::report_errors();
  27. }