Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54942 - trunk/libs/spirit/test/qi
From: joel_at_[hidden]
Date: 2009-07-14 02:46:13


Author: djowel
Date: 2009-07-14 02:46:12 EDT (Tue, 14 Jul 2009)
New Revision: 54942
URL: http://svn.boost.org/trac/boost/changeset/54942

Log:
fix lists not reseting its local value used as the left parser's attribute between matching consecutive elements of the 'list'.
Text files modified:
   trunk/libs/spirit/test/qi/list.cpp | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/libs/spirit/test/qi/list.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/list.cpp (original)
+++ trunk/libs/spirit/test/qi/list.cpp 2009-07-14 02:46:12 EDT (Tue, 14 Jul 2009)
@@ -64,6 +64,12 @@
         BOOST_TEST(test_attr("(1,2)", '(' >> int_ % ',' >> ')', v));
         BOOST_TEST(2 == v.size() && 1 == v[0] && 2 == v[1]);
     }
+
+ {
+ std::vector<std::string> v;
+ BOOST_TEST(test_attr("a,b", +alpha % ',', v));
+ BOOST_TEST(2 == v.size() && "a" == v[0] && "b" == v[1]);
+ }
 
     { // actions
         namespace phx = boost::phoenix;


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