• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
6 #include <boost/metaparse/v1/impl/next_digit.hpp>
7 
8 #include <boost/mpl/assert.hpp>
9 #include <boost/mpl/equal_to.hpp>
10 #include <boost/mpl/int.hpp>
11 
12 #include "test_case.hpp"
13 
BOOST_METAPARSE_TEST_CASE(next_digit)14 BOOST_METAPARSE_TEST_CASE(next_digit)
15 {
16   using boost::metaparse::v1::impl::next_digit;
17 
18   using boost::mpl::equal_to;
19   using boost::mpl::int_;
20 
21   BOOST_MPL_ASSERT((equal_to<int_< 0>, next_digit::apply<int_<0>, int_<0> > >));
22   BOOST_MPL_ASSERT((equal_to<int_<10>, next_digit::apply<int_<1>, int_<0> > >));
23   BOOST_MPL_ASSERT((equal_to<int_<13>, next_digit::apply<int_<1>, int_<3> > >));
24 }
25 
26