Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65655 - trunk/libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-09-28 18:29:35


Author: hkaiser
Date: 2010-09-28 18:29:34 EDT (Tue, 28 Sep 2010)
New Revision: 65655
URL: http://svn.boost.org/trac/boost/changeset/65655

Log:
Adding regression test for real_parser<float>, still fails, ATM.
Text files modified:
   trunk/libs/spirit/test/qi/kleene.cpp | 1 -
   trunk/libs/spirit/test/qi/list.cpp | 1 -
   trunk/libs/spirit/test/qi/real.cpp | 9 +++++++++
   3 files changed, 9 insertions(+), 2 deletions(-)

Modified: trunk/libs/spirit/test/qi/kleene.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/kleene.cpp (original)
+++ trunk/libs/spirit/test/qi/kleene.cpp 2010-09-28 18:29:34 EDT (Tue, 28 Sep 2010)
@@ -8,7 +8,6 @@
 #include <vector>
 
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/utility/enable_if.hpp>
 
 #include <boost/spirit/include/qi_operator.hpp>
 #include <boost/spirit/include/qi_char.hpp>

Modified: trunk/libs/spirit/test/qi/list.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/list.cpp (original)
+++ trunk/libs/spirit/test/qi/list.cpp 2010-09-28 18:29:34 EDT (Tue, 28 Sep 2010)
@@ -10,7 +10,6 @@
 #include <map>
 
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/utility/enable_if.hpp>
 
 #include <boost/spirit/include/qi_operator.hpp>
 #include <boost/spirit/include/qi_char.hpp>

Modified: trunk/libs/spirit/test/qi/real.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/real.cpp (original)
+++ trunk/libs/spirit/test/qi/real.cpp 2010-09-28 18:29:34 EDT (Tue, 28 Sep 2010)
@@ -412,5 +412,14 @@
         //~ BOOST_TEST(test_attr("-123456e6", double_, n));
     //~ }
 
+ // this should pass, but currently doesn't because of the way the real
+ // parser handles the fractional part of a number
+ {
+ using boost::spirit::qi::float_;
+
+ float f;
+ BOOST_TEST(test_attr("123233.4124", float_, f) && f == 123233.4140625f);
+ }
+
     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