Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73833 - trunk/libs/spirit/test/qi
From: joel_at_[hidden]
Date: 2011-08-16 19:21:30


Author: djowel
Date: 2011-08-16 19:21:29 EDT (Tue, 16 Aug 2011)
New Revision: 73833
URL: http://svn.boost.org/trac/boost/changeset/73833

Log:
added test for SA chaining
Text files modified:
   trunk/libs/spirit/test/qi/actions2.cpp | 8 +++++++-
   1 files changed, 7 insertions(+), 1 deletions(-)

Modified: trunk/libs/spirit/test/qi/actions2.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/actions2.cpp (original)
+++ trunk/libs/spirit/test/qi/actions2.cpp 2011-08-16 19:21:29 EDT (Tue, 16 Aug 2011)
@@ -27,7 +27,11 @@
     std::cout << "parsing got: " << s << std::endl;
 }
 
-void b(char x) {}
+std::string s;
+void b(char c)
+{
+ s += c;
+}
 
 int main()
 {
@@ -48,7 +52,9 @@
     { // chaining
         using namespace boost::spirit::ascii;
 
+ s = "";
         BOOST_TEST(test("a", char_[b][b]));
+ BOOST_TEST(s == "aa");
     }
 
     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