1 /*=============================================================================
2 Copyright (c) 2001-2015 Joel de Guzman
3 Copyright (c) 2001-2011 Hartmut Kaiser
4 http://spirit.sourceforge.net/
5
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 =============================================================================*/
9 #include <boost/detail/lightweight_test.hpp>
10 #include <boost/spirit/home/x3.hpp>
11
12 #include <iostream>
13 #include "test.hpp"
14
15 int
main()16 main()
17 {
18 using spirit_test::test;
19 using spirit_test::test_attr;
20 using boost::spirit::x3::lit;
21
22 {
23 BOOST_TEST((test("kimpo", lit("kimpo"))));
24
25 std::basic_string<char> s("kimpo");
26 std::basic_string<wchar_t> ws(L"kimpo");
27 BOOST_TEST((test("kimpo", lit(s))));
28 BOOST_TEST((test(L"kimpo", lit(ws))));
29 }
30
31 {
32 std::basic_string<char> s("kimpo");
33 BOOST_TEST((test("kimpo", lit(s))));
34
35 std::basic_string<wchar_t> ws(L"kimpo");
36 BOOST_TEST((test(L"kimpo", lit(ws))));
37 }
38
39 {
40 using namespace boost::spirit::x3::ascii;
41 BOOST_TEST((test(" kimpo", lit("kimpo"), space)));
42 BOOST_TEST((test(L" kimpo", lit(L"kimpo"), space)));
43 }
44
45 {
46 using namespace boost::spirit::x3::iso8859_1;
47 BOOST_TEST((test(" kimpo", lit("kimpo"), space)));
48 BOOST_TEST((test(L" kimpo", lit(L"kimpo"), space)));
49 }
50
51 return boost::report_errors();
52 }
53