diff options
Diffstat (limited to 'src/boost/libs/spirit/classic/test/lazy_tests.cpp')
-rw-r--r-- | src/boost/libs/spirit/classic/test/lazy_tests.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/boost/libs/spirit/classic/test/lazy_tests.cpp b/src/boost/libs/spirit/classic/test/lazy_tests.cpp new file mode 100644 index 00000000..47485c2f --- /dev/null +++ b/src/boost/libs/spirit/classic/test/lazy_tests.cpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2003 Vaclav Vesely + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to 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 <boost/spirit/include/classic_core.hpp> +#include <boost/spirit/include/classic_assign_actor.hpp> +#include <boost/spirit/include/classic_lazy.hpp> +#include <boost/spirit/include/phoenix1_primitives.hpp> +#include <boost/spirit/include/phoenix1_operators.hpp> +#include <boost/detail/lightweight_test.hpp> + +using namespace boost; +using namespace BOOST_SPIRIT_CLASSIC_NS; +using namespace phoenix; + +int main() +{ + int result; + BOOST_TEST(parse("123", lazy_p(val(int_p))[assign_a(result)]).full); + BOOST_TEST((result == 123)); + return boost::report_errors(); +} + |