is_char_c.cpp 660 B

12345678910111213141516171819202122232425
  1. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
  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. #include <boost/metaparse/v1/impl/is_char_c.hpp>
  6. #include <boost/mpl/assert.hpp>
  7. #include <boost/mpl/char.hpp>
  8. #include "test_case.hpp"
  9. BOOST_METAPARSE_TEST_CASE(is_char_c)
  10. {
  11. using boost::metaparse::v1::impl::is_char_c;
  12. using boost::mpl::char_;
  13. // test_for_the_same_char
  14. BOOST_MPL_ASSERT(( is_char_c<'x'>::apply<char_<'x'> > ));
  15. // test_for_another_char
  16. BOOST_MPL_ASSERT_NOT(( is_char_c<'x'>::apply<char_<'y'> > ));
  17. }