Boost logo

Boost-Commit :

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


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

Log:
Spirit: added even more alternative tests
Text files modified:
   trunk/libs/spirit/test/karma/alternative.cpp | 17 +++++++++++++++++
   1 files changed, 17 insertions(+), 0 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:18:32 EDT (Sat, 24 Oct 2009)
@@ -74,6 +74,23 @@
     }
 
     {
+ // more tests for optional attribute
+ optional<int> o;
+ BOOST_TEST(test("a", lit('a') | int_, o));
+ BOOST_TEST(test("a", int_ | lit('a'), o));
+
+ o = 10;
+ BOOST_TEST(test("a", lit('a') | int_, o));
+ BOOST_TEST(test("10", int_ | lit('a'), o));
+ }
+
+ {
+ int i = 10;
+ BOOST_TEST(test("a", lit('a') | int_, i));
+ BOOST_TEST(test("10", int_ | lit('a'), i));
+ }
+
+ {
         // testing for alignment/truncation problems on little endian systems
         // (big endian systems will fail one of the other tests below)
         std::basic_string<wchar_t> generated;


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