]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/spirit/classic/test/parser_context_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / spirit / classic / test / parser_context_test.cpp
1 /*=============================================================================
2 Copyright (c) 2003 Vaclav Vesely
3 http://spirit.sourceforge.net/
4
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>
11
12 #include <boost/core/lightweight_test.hpp>
13
14 using namespace boost;
15 using namespace BOOST_SPIRIT_CLASSIC_NS;
16
17 int main()
18 {
19 rule<parser_context<int> > int_rule = int_p;
20 int result(0);
21 parse("123", int_rule[assign_a(result)]);
22 BOOST_TEST(result == 123);
23 return boost::report_errors();
24 }
25