| 1 | // Copyright (c) 2001-2011 Hartmut Kaiser |
|---|---|
| 2 | // |
| 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 5 | |
| 6 | #include <boost/spirit/include/karma_and_predicate.hpp> |
| 7 | |
| 8 | #include <boost/spirit/include/karma_int.hpp> |
| 9 | #include <boost/spirit/include/karma_generate.hpp> |
| 10 | #include <boost/spirit/include/karma_operator.hpp> |
| 11 | #include <boost/spirit/include/karma_char.hpp> |
| 12 | |
| 13 | #include <iostream> |
| 14 | #include "test.hpp" |
| 15 | |
| 16 | int |
| 17 | main() |
| 18 | { |
| 19 | using namespace spirit_test; |
| 20 | using namespace boost::spirit; |
| 21 | |
| 22 | { |
| 23 | BOOST_TEST(test("1", int_(1) << &(int_(2) << &int_(3) << int_(4)))); |
| 24 | } |
| 25 | |
| 26 | { |
| 27 | using boost::spirit::ascii::char_; |
| 28 | |
| 29 | BOOST_TEST(test("b", &char_('a') << 'b' | 'c', 'a')); |
| 30 | BOOST_TEST(test("c", &char_('a') << 'b' | 'c', 'x')); |
| 31 | } |
| 32 | |
| 33 | return boost::report_errors(); |
| 34 | } |
| 35 |
