• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/detail/lightweight_test.hpp>
8 #include <boost/spirit/home/x3.hpp>
9 
10 #include <iostream>
11 #include "test.hpp"
12 
13 int
main()14 main()
15 {
16     using spirit_test::test;
17     using boost::spirit::x3::eol;
18 
19     BOOST_SPIRIT_ASSERT_CONSTEXPR_CTORS(eol);
20 
21     {
22         BOOST_TEST((test("\r\n", eol)));
23         BOOST_TEST((test("\r", eol)));
24         BOOST_TEST((test("\n", eol)));
25         BOOST_TEST((!test("\n\r", eol)));
26         BOOST_TEST((!test("", eol)));
27     }
28 
29     {
30         BOOST_TEST(what(eol) == "eol");
31     }
32 
33     return boost::report_errors();
34 }
35