| 1 | /*============================================================================= |
|---|---|
| 2 | Copyright (c) 2001-2015 Joel de Guzman |
| 3 | |
| 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | =============================================================================*/ |
| 7 | #include <boost/spirit/home/x3.hpp> |
| 8 | |
| 9 | #include <iostream> |
| 10 | #include "test.hpp" |
| 11 | |
| 12 | int |
| 13 | main() |
| 14 | { |
| 15 | using spirit_test::test; |
| 16 | using boost::spirit::x3::eol; |
| 17 | |
| 18 | BOOST_SPIRIT_ASSERT_CONSTEXPR_CTORS(eol); |
| 19 | |
| 20 | { |
| 21 | BOOST_TEST((test("\r\n", eol))); |
| 22 | BOOST_TEST((test("\r", eol))); |
| 23 | BOOST_TEST((test("\n", eol))); |
| 24 | BOOST_TEST((!test("\n\r", eol))); |
| 25 | BOOST_TEST((!test("", eol))); |
| 26 | } |
| 27 | |
| 28 | { |
| 29 | BOOST_TEST(what(eol) == "eol"); |
| 30 | } |
| 31 | |
| 32 | return boost::report_errors(); |
| 33 | } |
| 34 |
