summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/metaparse/test/next_digit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/metaparse/test/next_digit.cpp')
-rw-r--r--src/boost/libs/metaparse/test/next_digit.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/boost/libs/metaparse/test/next_digit.cpp b/src/boost/libs/metaparse/test/next_digit.cpp
new file mode 100644
index 000000000..376b61698
--- /dev/null
+++ b/src/boost/libs/metaparse/test/next_digit.cpp
@@ -0,0 +1,25 @@
+// Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/metaparse/v1/impl/next_digit.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/int.hpp>
+
+#include "test_case.hpp"
+
+BOOST_METAPARSE_TEST_CASE(next_digit)
+{
+ using boost::metaparse::v1::impl::next_digit;
+
+ using boost::mpl::equal_to;
+ using boost::mpl::int_;
+
+ BOOST_MPL_ASSERT((equal_to<int_< 0>, next_digit::apply<int_<0>, int_<0> > >));
+ BOOST_MPL_ASSERT((equal_to<int_<10>, next_digit::apply<int_<1>, int_<0> > >));
+ BOOST_MPL_ASSERT((equal_to<int_<13>, next_digit::apply<int_<1>, int_<3> > >));
+}
+