Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57129 - trunk/libs/spirit/test/karma
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-24 10:09:16


Author: hkaiser
Date: 2009-10-24 10:09:15 EDT (Sat, 24 Oct 2009)
New Revision: 57129
URL: http://svn.boost.org/trac/boost/changeset/57129

Log:
Spirit: added more alternative tests
Text files modified:
   trunk/libs/spirit/test/karma/alternative.cpp | 9 ++++++++-
   1 files changed, 8 insertions(+), 1 deletions(-)

Modified: trunk/libs/spirit/test/karma/alternative.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/alternative.cpp (original)
+++ trunk/libs/spirit/test/karma/alternative.cpp 2009-10-24 10:09:15 EDT (Sat, 24 Oct 2009)
@@ -51,7 +51,14 @@
 
     {
         // test optional attribute
- optional<variant<int, char> > v (10);
+ optional<variant<int, char> > v;
+ BOOST_TEST(!test("", char_ | int_, v));
+ BOOST_TEST(!test("", int_ | char_, v));
+ BOOST_TEST(test("a", lit('a') | char_ | int_, v));
+ BOOST_TEST(test("a", char_ | lit('a') | int_, v));
+ BOOST_TEST(test("a", int_ | lit('a') | char_, v));
+
+ v = 10;
         BOOST_TEST(test("10", char_ | int_, v));
         BOOST_TEST(test("10", int_ | char_, v));
         BOOST_TEST(test("a", lit('a') | char_ | int_, v));


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