// Copyright Abel Sinkovics (abel@sinkovics.hu) 2010 - 2011. // 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) // This header file contains code that is reused by other cpp files #include #include #include #include #include #include #include #include "common.hpp" #include #include #include #include "test_case.hpp" namespace { using boost::metaparse::start; using boost::mpl::list_c; using boost::mpl::apply_wrap2; typedef list_c unix_multi_line_text; typedef list_c dos_multi_line_text; typedef list_c mac_multi_line_text; typedef apply_wrap2 parse_first_char; } BOOST_METAPARSE_TEST_CASE(TEST_NAME) { using boost::metaparse::get_result; using boost::metaparse::get_remaining; using boost::metaparse::get_position; using boost::metaparse::is_error; using boost::metaparse::iterate_c; using boost::metaparse::get_line; using boost::mpl::equal_to; // test_for_non_empty_string BOOST_MPL_ASSERT((equal_to::type, char_h>)); // test_for_non_empty_string_second BOOST_MPL_ASSERT(( equal_to< get_result< apply_wrap2< oc, get_remaining::type, get_position::type > >::type, char_e > )); // test_for_empty_string BOOST_MPL_ASSERT((is_error >)); // test_unix_multi_line_text BOOST_MPL_ASSERT(( equal_to< int2, get_line< get_position< apply_wrap2, unix_multi_line_text, start> > > > )); // test_dos_multi_line_text BOOST_MPL_ASSERT(( equal_to< int2, get_line< get_position, dos_multi_line_text, start> > > > )); // test_mac_multi_line_text BOOST_MPL_ASSERT(( equal_to< int2, get_line< get_position, mac_multi_line_text, start> > > > )); }