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/config/warning_disable.hpp> 7 #include <boost/detail/lightweight_test.hpp> 8 9 #include <boost/spirit/include/karma_numeric.hpp> 10 #include <boost/spirit/include/karma_generate.hpp> 11 #include <boost/spirit/include/karma_operator.hpp> 12 #include <boost/spirit/include/karma_auxiliary.hpp> 13 #include <boost/spirit/include/karma_char.hpp> 14 15 #include <iostream> 16 #include "test.hpp" 17 18 int main()19main() 20 { 21 using namespace spirit_test; 22 using namespace boost::spirit; 23 24 { 25 BOOST_TEST(test("1", int_(1) << &(int_(2) << &int_(3) << int_(4)))); 26 } 27 28 { 29 using boost::spirit::ascii::char_; 30 31 BOOST_TEST(test("b", &char_('a') << 'b' | 'c', 'a')); 32 BOOST_TEST(test("c", &char_('a') << 'b' | 'c', 'x')); 33 } 34 35 return boost::report_errors(); 36 } 37