Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59424 - trunk/libs/spirit/test/qi
From: joel_at_[hidden]
Date: 2010-02-02 07:15:31


Author: djowel
Date: 2010-02-02 07:15:30 EST (Tue, 02 Feb 2010)
New Revision: 59424
URL: http://svn.boost.org/trac/boost/changeset/59424

Log:
basic unicode tests ok
Text files modified:
   trunk/libs/spirit/test/qi/char_class.cpp | 26 ++++++++++++++++++++++++++
   1 files changed, 26 insertions(+), 0 deletions(-)

Modified: trunk/libs/spirit/test/qi/char_class.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/char_class.cpp (original)
+++ trunk/libs/spirit/test/qi/char_class.cpp 2010-02-02 07:15:30 EST (Tue, 02 Feb 2010)
@@ -169,6 +169,32 @@
         BOOST_TEST(test(L"f", xdigit));
         BOOST_TEST(!test(L"g", xdigit));
     }
+
+ {
+ using namespace boost::spirit::unicode;
+ BOOST_TEST(test(L"1", alnum));
+ BOOST_TEST(!test(L" ", alnum));
+ BOOST_TEST(!test(L"1", alpha));
+ BOOST_TEST(test(L"x", alpha));
+ BOOST_TEST(test(L" ", blank));
+ BOOST_TEST(!test(L"x", blank));
+ BOOST_TEST(test(L"1", digit));
+ BOOST_TEST(!test(L"x", digit));
+ BOOST_TEST(test(L"a", lower));
+ BOOST_TEST(!test(L"A", lower));
+ BOOST_TEST(test(L"!", punct));
+ BOOST_TEST(!test(L"x", punct));
+ BOOST_TEST(test(L" ", space));
+ BOOST_TEST(test(L"\n", space));
+ BOOST_TEST(test(L"\r", space));
+ BOOST_TEST(test(L"\t", space));
+ BOOST_TEST(test(L"A", upper));
+ BOOST_TEST(!test(L"a", upper));
+ BOOST_TEST(test(L"A", xdigit));
+ BOOST_TEST(test(L"0", xdigit));
+ BOOST_TEST(test(L"f", xdigit));
+ BOOST_TEST(!test(L"g", xdigit));
+ }
 
     { // test attribute extraction
         using boost::spirit::qi::domain;


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