Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58118 - in trunk/libs/spirit/test: karma qi
From: hartmut.kaiser_at_[hidden]
Date: 2009-12-03 11:57:56


Author: hkaiser
Date: 2009-12-03 11:57:55 EST (Thu, 03 Dec 2009)
New Revision: 58118
URL: http://svn.boost.org/trac/boost/changeset/58118

Log:
Spirit: simplified auto facilities, adjusted tests to compile with gcc as well
Text files modified:
   trunk/libs/spirit/test/karma/auto.cpp | 9 +++++----
   trunk/libs/spirit/test/qi/auto.cpp | 3 ++-
   2 files changed, 7 insertions(+), 5 deletions(-)

Modified: trunk/libs/spirit/test/karma/auto.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/auto.cpp (original)
+++ trunk/libs/spirit/test/karma/auto.cpp 2009-12-03 11:57:55 EST (Thu, 03 Dec 2009)
@@ -5,7 +5,7 @@
 
 #include <boost/config/warning_disable.hpp>
 #include <boost/detail/lightweight_test.hpp>
-
+#include <boost/mpl/print.hpp>
 #include <boost/fusion/include/std_pair.hpp>
 
 #include <boost/spirit/include/karma_bool.hpp>
@@ -54,7 +54,7 @@
 {
     BOOST_TEST((traits::meta_create_exists<karma::domain, Attribute>::value));
 
- typedef spirit_test::output_iterator<Char>::type sink_type;
+ typedef typename spirit_test::output_iterator<Char>::type sink_type;
     karma::rule<sink_type, Attribute()> r =
         karma::create_generator<Attribute>();
     return spirit_test::test(expected, r, attr);
@@ -66,17 +66,18 @@
 {
     BOOST_TEST((traits::meta_create_exists<karma::domain, Attribute>::value));
 
- typedef spirit_test::output_iterator<Char>::type sink_type;
+ typedef typename spirit_test::output_iterator<Char>::type sink_type;
     karma::rule<sink_type, Attribute(), Delimiter> r =
         karma::create_generator<Attribute>();
     return spirit_test::test_delimited(expected, r, attr, d);
 }
 
+struct my_type {};
+
 ///////////////////////////////////////////////////////////////////////////////
 int main()
 {
     {
- struct my_type {};
         BOOST_TEST((!traits::meta_create_exists<karma::domain, my_type>::value));
     }
 

Modified: trunk/libs/spirit/test/qi/auto.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/auto.cpp (original)
+++ trunk/libs/spirit/test/qi/auto.cpp 2009-12-03 11:57:55 EST (Thu, 03 Dec 2009)
@@ -66,11 +66,12 @@
     return spirit_test::test_attr(in, r, attr, skipper) && attr == expected;
 }
 
+struct my_type {};
+
 ///////////////////////////////////////////////////////////////////////////////
 int main()
 {
     {
- struct my_type {};
         BOOST_TEST((!traits::meta_create_exists<qi::domain, my_type>::value));
     }
 


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