// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include #include // #include // #include #include #include #include #include #include "test.hpp" int main() { namespace karma = boost::spirit::karma; using spirit_test::test; using namespace boost::spirit; using namespace boost::spirit::karma; namespace phx = boost::phoenix; { BOOST_TEST(test("123", karma::lazy(phx::val(int_)), 123)); } { int result = 123; BOOST_TEST(test("123", karma::lazy(phx::val(int_))[_1 = phx::ref(result)])); } // { // typedef spirit_test::output_iterator::type outiter_type; // rule r; // // r = char_('<') << karma::lazy(_r1) << '>' << "'; // // std::string tag("tag"), foo("foo"); // BOOST_TEST(test("", r (phx::ref(tag)))); // BOOST_TEST(!test("", r (phx::ref(foo)))); // } return boost::report_errors(); }