test_doc_identifier.cxx 778 B

1234567891011121314151617181920212223242526272829303132
  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_identifier.hpp>
  6. #include <boost/detail/lightweight_test.hpp>
  7. int main()
  8. {
  9. #if BOOST_PP_VARIADICS
  10. #define BOOST_VMD_REGISTER_yellow (yellow)
  11. #define BOOST_VMD_REGISTER_green (green)
  12. #define BOOST_VMD_REGISTER_blue (blue)
  13. BOOST_TEST(BOOST_VMD_IS_IDENTIFIER(yellow));
  14. BOOST_TEST(BOOST_VMD_IS_IDENTIFIER(green));
  15. BOOST_TEST(BOOST_VMD_IS_IDENTIFIER(blue));
  16. BOOST_TEST(!BOOST_VMD_IS_IDENTIFIER(purple));
  17. #else
  18. BOOST_ERROR("No variadic macro support");
  19. #endif
  20. return boost::report_errors();
  21. }