|
Boost-Commit : |
From: joel_at_[hidden]
Date: 2008-04-17 05:02:04
Author: djowel
Date: 2008-04-17 05:02:03 EDT (Thu, 17 Apr 2008)
New Revision: 44492
URL: http://svn.boost.org/trac/boost/changeset/44492
Log:
char-sets
Text files modified:
trunk/libs/spirit/test/qi/char.cpp | 17 +++++++++++++++++
trunk/libs/spirit/test/qi/range_run.cpp | 2 +-
2 files changed, 18 insertions(+), 1 deletions(-)
Modified: trunk/libs/spirit/test/qi/char.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/char.cpp (original)
+++ trunk/libs/spirit/test/qi/char.cpp 2008-04-17 05:02:03 EDT (Thu, 17 Apr 2008)
@@ -91,6 +91,23 @@
BOOST_TEST(!test(L"z", ~~wchar('b', 'y')));
}
+
+ { // single char strings as argument to char_
+ BOOST_TEST(test("x", char_("x"), space));
+ BOOST_TEST(test("x", wchar(L"x"), space));
+ }
+
+ {
+ // chsets
+ BOOST_TEST(test("x", char_("a-z")));
+ BOOST_TEST(!test("1", char_("a-z")));
+ BOOST_TEST(test("1", char_("a-z0-9")));
+
+ BOOST_TEST(test("x", char_(L"a-z")));
+ BOOST_TEST(!test("1", char_(L"a-z")));
+ BOOST_TEST(test("1", char_(L"a-z0-9")));
+ }
+
{ // lazy chars
using namespace boost::phoenix;
Modified: trunk/libs/spirit/test/qi/range_run.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/range_run.cpp (original)
+++ trunk/libs/spirit/test/qi/range_run.cpp 2008-04-17 05:02:03 EDT (Thu, 17 Apr 2008)
@@ -7,7 +7,7 @@
#include <iostream>
#include <cctype>
#include <boost/detail/lightweight_test.hpp>
-#include <boost/spirit/qi/char/detail/range_run.hpp>
+#include <boost/spirit/home/qi/char/detail/range_run.hpp>
#include <boost/random.hpp>
#include <boost/dynamic_bitset.hpp>
#include <boost/integer_traits.hpp>
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