test_assert_fail_is_identifier.cxx 739 B

1234567891011121314151617181920212223242526272829
  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.hpp>
  6. #include <boost/vmd/is_identifier.hpp>
  7. #include <boost/detail/lightweight_test.hpp>
  8. int main()
  9. {
  10. #if BOOST_PP_VARIADICS
  11. #define JDATA somevalue
  12. #define BOOST_VMD_REGISTER_zzz (zzz)
  13. #define BOOST_VMD_DETECT_zzz_zzz
  14. #define BOOST_VMD_REGISTER_somevalue (somevalue)
  15. #define BOOST_VMD_DETECT_somevalue_somevalue
  16. BOOST_VMD_ASSERT(BOOST_VMD_IS_IDENTIFIER(JDATA,zzz),BOOST_VMD_TEST_FAIL_IS_IDENTIFIER)
  17. #endif
  18. return boost::report_errors();
  19. }