one_char_except_test.hpp 890 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2011.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // This header file contains code that is reused by other cpp files
  6. #include <boost/metaparse/start.hpp>
  7. #include <boost/metaparse/is_error.hpp>
  8. #include <boost/mpl/apply_wrap.hpp>
  9. #include <boost/mpl/assert.hpp>
  10. #include <boost/preprocessor/cat.hpp>
  11. #include "test_case.hpp"
  12. BOOST_METAPARSE_TEST_CASE(BOOST_PP_CAT(TEST_NAME, _except))
  13. {
  14. using boost::metaparse::is_error;
  15. using boost::metaparse::start;
  16. using boost::mpl::apply_wrap2;
  17. // rejects_except_char
  18. BOOST_MPL_ASSERT((is_error<apply_wrap2<oc, str_0, start> >));
  19. // rejects_other_except_char
  20. BOOST_MPL_ASSERT((is_error<apply_wrap2<oc, str_1, start> >));
  21. }
  22. #include "one_char_test.hpp"