From f307ef83536693834cd70e8366db01f1b5473d7b Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 19 Apr 2020 16:01:21 -0400 Subject: [PATCH] Turn off testing wide character regexes when not appropriate. --- example/timer/regex_timer.cpp | 15 ++++----------- test/captures/captures_test.cpp | 4 ++++ .../named_subexpressions_test.cpp | 2 ++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/example/timer/regex_timer.cpp b/example/timer/regex_timer.cpp index 731eb567..d121b70f 100644 --- a/example/timer/regex_timer.cpp +++ b/example/timer/regex_timer.cpp @@ -367,16 +367,9 @@ int main(int argc, char**argv) } #if defined(_WIN32) && defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(UNDER_CE) +#if !defined(BOOST_EMBTC) #pragma comment(lib, "user32.lib") +#else +#pragma comment(lib, "user32.a") +#endif #endif - - - - - - - - - - - diff --git a/test/captures/captures_test.cpp b/test/captures/captures_test.cpp index 641d1b9b..56aec674 100644 --- a/test/captures/captures_test.cpp +++ b/test/captures/captures_test.cpp @@ -68,6 +68,8 @@ void test_captures(const std::string& regx, const std::string& text, T& expected } } } + +#if !defined(BOOST_NO_WREGEX) std::wstring wre(regx.begin(), regx.end()); std::wstring wtext(text.begin(), text.end()); @@ -89,6 +91,8 @@ void test_captures(const std::string& regx, const std::string& text, T& expected } } } + +#endif #ifdef BOOST_HAS_ICU boost::u32regex ure = boost::make_u32regex(regx); diff --git a/test/named_subexpressions/named_subexpressions_test.cpp b/test/named_subexpressions/named_subexpressions_test.cpp index a92c02b8..5bd38fbc 100644 --- a/test/named_subexpressions/named_subexpressions_test.cpp +++ b/test/named_subexpressions/named_subexpressions_test.cpp @@ -106,7 +106,9 @@ void test_named_subexpressions(charT) int cpp_main( int , char* [] ) { test_named_subexpressions(char(0)); +#if !defined(BOOST_NO_WREGEX) test_named_subexpressions(wchar_t(0)); +#endif return 0; }