Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73832 - trunk/libs/spirit/test/qi
From: joel_at_[hidden]
Date: 2011-08-16 19:18:51


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

Log:
added test for SA chaining
Text files modified:
   trunk/libs/spirit/test/qi/actions2.cpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 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:18:50 EDT (Tue, 16 Aug 2011)
@@ -27,11 +27,14 @@
     std::cout << "parsing got: " << s << std::endl;
 }
 
+void b(char x) {}
+
 int main()
 {
     namespace qi = boost::spirit::qi;
     namespace phoenix = boost::phoenix;
     using spirit_test::test_attr;
+ using spirit_test::test;
 
     {
         qi::rule<char const*, std::string()> r;
@@ -42,6 +45,12 @@
         BOOST_TEST(attr == "abcdef");
     }
 
+ { // chaining
+ using namespace boost::spirit::ascii;
+
+ BOOST_TEST(test("a", char_[b][b]));
+ }
+
     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