mirror of
https://github.com/boostorg/regex.git
synced 2025-07-17 14:22:08 +02:00
Merge ICU testing fixes from Trunk.
Authorized by Daniel James. [SVN r72846]
This commit is contained in:
@ -20,6 +20,10 @@
|
|||||||
#include "test_locale.hpp"
|
#include "test_locale.hpp"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#ifdef BOOST_HAS_ICU
|
||||||
|
#include <unicode/uloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TEST_THREADS
|
#ifdef TEST_THREADS
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
@ -82,6 +86,19 @@ void run_tests()
|
|||||||
|
|
||||||
int cpp_main(int /*argc*/, char * /*argv*/[])
|
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
|
#ifdef TEST_THREADS
|
||||||
try{
|
try{
|
||||||
get_array_data(); // initialises data.
|
get_array_data(); // initialises data.
|
||||||
|
@ -75,8 +75,8 @@ void test_unicode()
|
|||||||
TEST_REGEX_CLASS_U(Non-Spacing Mark, 20EA);
|
TEST_REGEX_CLASS_U(Non-Spacing Mark, 20EA);
|
||||||
TEST_REGEX_CLASS_U(Mc, 1938);
|
TEST_REGEX_CLASS_U(Mc, 1938);
|
||||||
TEST_REGEX_CLASS_U(Spacing Combining Mark, 1938);
|
TEST_REGEX_CLASS_U(Spacing Combining Mark, 1938);
|
||||||
TEST_REGEX_CLASS_U(Me, 06DE);
|
TEST_REGEX_CLASS_U(Me, 0488);
|
||||||
TEST_REGEX_CLASS_U(Enclosing Mark, 06DE);
|
TEST_REGEX_CLASS_U(Enclosing Mark, 0488);
|
||||||
TEST_REGEX_CLASS_U(N*, 0669);
|
TEST_REGEX_CLASS_U(N*, 0669);
|
||||||
TEST_REGEX_CLASS_U(Number, 0669);
|
TEST_REGEX_CLASS_U(Number, 0669);
|
||||||
TEST_REGEX_CLASS_U(Nd, 0669);
|
TEST_REGEX_CLASS_U(Nd, 0669);
|
||||||
|
Reference in New Issue
Block a user