]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/spirit/classic/test/parser_context_test.cpp
1 /*=============================================================================
2 Copyright (c) 2003 Vaclav Vesely
3 http://spirit.sourceforge.net/
5 Use, modification and distribution is subject to the Boost Software
6 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
8 =============================================================================*/
9 #include <boost/spirit/include/classic_core.hpp>
10 #include <boost/spirit/include/classic_assign_actor.hpp>
12 #include <boost/core/lightweight_test.hpp>
14 using namespace boost
;
15 using namespace BOOST_SPIRIT_CLASSIC_NS
;
19 rule
<parser_context
<int> > int_rule
= int_p
;
21 parse("123", int_rule
[assign_a(result
)]);
22 BOOST_TEST(result
== 123);
23 return boost::report_errors();