diff --git a/test/c_compiler_checks/wide_posix_api_check.c b/test/c_compiler_checks/wide_posix_api_check.c index dffc3f62..c43bc7f8 100644 --- a/test/c_compiler_checks/wide_posix_api_check.c +++ b/test/c_compiler_checks/wide_posix_api_check.c @@ -21,11 +21,13 @@ * time check only. */ +#define UNICODE +#define _UNICODE + #include #include #include #include -#define UNICODE #include #ifndef BOOST_NO_WREGEX diff --git a/test/c_compiler_checks/wide_posix_api_check.cpp b/test/c_compiler_checks/wide_posix_api_check.cpp index 5e3db24a..afc53cf9 100644 --- a/test/c_compiler_checks/wide_posix_api_check.cpp +++ b/test/c_compiler_checks/wide_posix_api_check.cpp @@ -21,11 +21,13 @@ * time check only. */ +#define UNICODE +#define _UNICODE + #include #include #include #include -#define UNICODE #include #ifndef BOOST_NO_WREGEX diff --git a/test/regress/tests.cpp b/test/regress/tests.cpp index 04c753ea..b3a99caf 100644 --- a/test/regress/tests.cpp +++ b/test/regress/tests.cpp @@ -22,7 +22,7 @@ * */ - +#include #include #include "regress.h" @@ -261,11 +261,14 @@ void cpp_tests(const reg_expression& e, bool recurse = true) #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) if(!recurse) { - std::basic_string s(search_text.begin(), search_text.end()); + unsigned len = search_text.size(); + const std::basic_string& s = search_text; grep_test_predicate::const_iterator, allocator_type> oi2(s.begin(), s.end()); regex_grep(oi2, s, e, flags[3]); grep_test_predicate oi3(s.c_str(), s.c_str()+s.size()); regex_grep(oi3, s.c_str(), e, flags[3]); + assert(s.size() == len); + assert(s.end() - s.begin() == len); } #endif }