|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72846 - branches/release/libs/regex/test/regress
From: john_at_[hidden]
Date: 2011-07-02 04:59:56
Author: johnmaddock
Date: 2011-07-02 04:59:55 EDT (Sat, 02 Jul 2011)
New Revision: 72846
URL: http://svn.boost.org/trac/boost/changeset/72846
Log:
Merge ICU testing fixes from Trunk.
Authorized by Daniel James.
Text files modified:
branches/release/libs/regex/test/regress/main.cpp | 17 +++++++++++++++++
branches/release/libs/regex/test/regress/test_unicode.cpp | 4 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
Modified: branches/release/libs/regex/test/regress/main.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/main.cpp (original)
+++ branches/release/libs/regex/test/regress/main.cpp 2011-07-02 04:59:55 EDT (Sat, 02 Jul 2011)
@@ -20,6 +20,10 @@
#include "test_locale.hpp"
#include <stdarg.h>
+#ifdef BOOST_HAS_ICU
+#include <unicode/uloc.h>
+#endif
+
#ifdef TEST_THREADS
#include <list>
#include <boost/thread.hpp>
@@ -82,6 +86,19 @@
int cpp_main(int /*argc*/, char * /*argv*/[])
{
+#ifdef BOOST_HAS_ICU
+ //
+ // We need to set the default locale used by ICU,
+ // otherwise some of our tests using equivalence classes fail.
+ //
+ UErrorCode err = U_ZERO_ERROR;
+ uloc_setDefault("en", &err);
+ if(err != U_ZERO_ERROR)
+ {
+ std::cerr << "Unable to set the default ICU locale to \"en\"." << std::endl;
+ return -1;
+ }
+#endif
#ifdef TEST_THREADS
try{
get_array_data(); // initialises data.
Modified: branches/release/libs/regex/test/regress/test_unicode.cpp
==============================================================================
--- branches/release/libs/regex/test/regress/test_unicode.cpp (original)
+++ branches/release/libs/regex/test/regress/test_unicode.cpp 2011-07-02 04:59:55 EDT (Sat, 02 Jul 2011)
@@ -75,8 +75,8 @@
TEST_REGEX_CLASS_U(Non-Spacing Mark, 20EA);
TEST_REGEX_CLASS_U(Mc, 1938);
TEST_REGEX_CLASS_U(Spacing Combining Mark, 1938);
- TEST_REGEX_CLASS_U(Me, 06DE);
- TEST_REGEX_CLASS_U(Enclosing Mark, 06DE);
+ TEST_REGEX_CLASS_U(Me, 0488);
+ TEST_REGEX_CLASS_U(Enclosing Mark, 0488);
TEST_REGEX_CLASS_U(N*, 0669);
TEST_REGEX_CLASS_U(Number, 0669);
TEST_REGEX_CLASS_U(Nd, 0669);
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