|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67689 - trunk/libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2011-01-05 16:06:41
Author: hkaiser
Date: 2011-01-05 16:06:41 EST (Wed, 05 Jan 2011)
New Revision: 67689
URL: http://svn.boost.org/trac/boost/changeset/67689
Log:
Spirit: more utree fixes
Text files modified:
trunk/libs/spirit/test/qi/utree4.cpp | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
Modified: trunk/libs/spirit/test/qi/utree4.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/utree4.cpp (original)
+++ trunk/libs/spirit/test/qi/utree4.cpp 2011-01-05 16:06:41 EST (Wed, 05 Jan 2011)
@@ -145,6 +145,30 @@
BOOST_TEST(test_attr("1,2 2,3", r3 >> ' ' >> r3, ut) &&
ut.which() == utree_type::list_type && check(ut, "( ( 1 2 ) ( 2 3 ) )"));
ut.clear();
+
+ rule<char const*, utree()> r4 = int_;
+ BOOST_TEST(test_attr("1 1", int_ >> ' ' >> -r4, ut) &&
+ ut.which() == utree_type::list_type && check(ut, "( 1 1 )"));
+ ut.clear();
+
+ rule<char const*, utree::list_type()> r5 = -r4;
+ BOOST_TEST(test_attr("1", r5, ut) &&
+ ut.which() == utree_type::list_type && check(ut, "( 1 )"));
+ ut.clear();
+
+ BOOST_TEST(test_attr("", r5, ut) &&
+ ut.which() == utree_type::list_type && check(ut, "( )"));
+ ut.clear();
+
+ BOOST_TEST(test_attr("1 1", r5 >> ' ' >> r5, ut) &&
+ ut.which() == utree_type::list_type && check(ut, "( ( 1 ) ( 1 ) )"));
+ ut.clear();
+
+ rule<char const*, utree::list_type()> r6 = int_;
+ rule<char const*, utree()> r7 = -r6;
+ BOOST_TEST(test_attr("1", r7, ut) &&
+ ut.which() == utree_type::list_type && check(ut, "( 1 )"));
+ ut.clear();
}
return boost::report_errors();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk