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 6 #include <boost/metaparse/is_error.hpp> 7 #include <boost/metaparse/fail.hpp> 8 9 #include "common.hpp" 10 11 #include <boost/mpl/not.hpp> 12 #include <boost/mpl/apply_wrap.hpp> 13 #include <boost/mpl/assert.hpp> 14 15 #include "test_case.hpp" 16 BOOST_METAPARSE_TEST_CASE(is_error)17BOOST_METAPARSE_TEST_CASE(is_error) 18 { 19 using boost::metaparse::is_error; 20 using boost::metaparse::fail; 21 22 using boost::mpl::not_; 23 using boost::mpl::apply_wrap2; 24 25 // test_not_error 26 BOOST_MPL_ASSERT((not_<is_error<int13> >)); 27 28 // test_error 29 BOOST_MPL_ASSERT((is_error<apply_wrap2<fail<int11>, int1, int13> >)); 30 } 31 32