diff options
author | Tim Shen <timshen91@gmail.com> | 2013-10-06 17:53:14 +0000 |
---|---|---|
committer | Tim Shen <timshen@gcc.gnu.org> | 2013-10-06 17:53:14 +0000 |
commit | 6cb4308702d0333775a1da15f43bcfd949115aeb (patch) | |
tree | 11e71078d7989a6eeed530a3f83baefff784fb8b /libstdc++-v3/testsuite/28_regex | |
parent | fef7e16b3fecef48e0ce67b9c0ab8fd32356e789 (diff) | |
download | gcc-6cb4308702d0333775a1da15f43bcfd949115aeb.zip gcc-6cb4308702d0333775a1da15f43bcfd949115aeb.tar.gz gcc-6cb4308702d0333775a1da15f43bcfd949115aeb.tar.bz2 |
regex.h: (regex_token_iterator<>::regex_token_iterator): Fix compile error.
2013-10-06 Tim Shen <timshen91@gmail.com>
* include/bits/regex.h: (regex_token_iterator<>::regex_token_iterator):
Fix compile error.
* include/bits/regex.tcc: (regex_replace<>): Remove default parameter.
2013-10-06 Tim Shen <timshen91@gmail.com>
* include/bits/regex.h (__regex_algo_impl<>, regex_match<>,
regex_search<>): New abstract function for regex_match and regex_search.
* include/bits/regex.tcc (__regex_algo_impl<>): Implement.
* include/bits/regex_executor.h
(_Executor<>::_M_lookahead,
_DFSExecutor<>::_M_clone,
_BFSExecutor<>::_M_clone): Let _M_clone to choose which executor to
use.
* include/bits/regex_executor.tcc (__get_executor<>): Update the
definition to support __policy.
* testsuite/28_regex/algorithms/regex_match/awk/cstring_01.cc: Use
*_debug.
* testsuite/28_regex/algorithms/regex_match/basic/empty_range.cc: Same.
* testsuite/28_regex/algorithms/regex_match/basic/string_01.cc: Same.
* testsuite/28_regex/algorithms/regex_match/basic/string_range_00_03.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/basic/string_range_02_03.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc: Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc: Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/58576.cc: Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/anymatcher.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc: Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/empty_range.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/emptygroup.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/hex.cc: Same.
* testsuite/28_regex/algorithms/regex_match/ecma/char/quoted_char.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc: Same.
* testsuite/28_regex/algorithms/regex_match/extended/
string_bracket_01.cc: Same.
* testsuite/28_regex/algorithms/regex_match/extended/cstring_plus.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/extended/
string_questionmark.cc: Same.
* testsuite/28_regex/algorithms/regex_match/extended/cstring_range.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/extended/string_any.cc:
Same.
* testsuite/28_regex/algorithms/regex_match/extended/
string_dispatch_01.cc: Same.
* testsuite/28_regex/algorithms/regex_match/extended/
string_range_00_03.cc: Same.
* testsuite/28_regex/algorithms/regex_match/extended/
string_range_01_03.cc: Same.
* testsuite/28_regex/algorithms/regex_match/extended/
string_range_02_03.cc: Same.
* testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
Same.
* testsuite/28_regex/algorithms/regex_search/basic/string_01.cc: Same.
* testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc: Same.
* testsuite/28_regex/algorithms/regex_search/ecma/flags.cc: Same.
* testsuite/28_regex/algorithms/regex_search/ecma/greedy.cc: Same.
* testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc: Same.
* testsuite/28_regex/match_results/format.cc: Same.
* testsuite/util/testsuite_regex.h
(regex_match_debug<>, regex_search_debug<>): Implement.
From-SVN: r203231
Diffstat (limited to 'libstdc++-v3/testsuite/28_regex')
33 files changed, 239 insertions, 140 deletions
diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/awk/cstring_01.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/awk/cstring_01.cc index d4edf12..e2bde22 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/awk/cstring_01.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/awk/cstring_01.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -34,12 +36,12 @@ test01() bool test __attribute__((unused)) = true; regex("\\[", regex_constants::awk); - VERIFY(regex_match("\"", regex("[\\\"]", regex_constants::awk))); - VERIFY(regex_match("/", regex("/", regex_constants::awk))); - VERIFY(regex_match("\a", regex("\\a", regex_constants::awk))); - VERIFY(regex_match("\"", regex("\\\"", regex_constants::awk))); - VERIFY(regex_match("5", regex("\\65", regex_constants::awk))); - VERIFY(regex_match("53", regex("\\0653", regex_constants::awk))); + VERIFY(regex_match_debug("\"", regex("[\\\"]", regex_constants::awk))); + VERIFY(regex_match_debug("/", regex("/", regex_constants::awk))); + VERIFY(regex_match_debug("\a", regex("\\a", regex_constants::awk))); + VERIFY(regex_match_debug("\"", regex("\\\"", regex_constants::awk))); + VERIFY(regex_match_debug("5", regex("\\65", regex_constants::awk))); + VERIFY(regex_match_debug("53", regex("\\0653", regex_constants::awk))); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/empty_range.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/empty_range.cc index eb22569..dd0dac4 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/empty_range.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/empty_range.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -45,8 +47,8 @@ test01() } FAIL("[]"); FAIL("[^]"); - VERIFY(regex_match("]", regex("[]]", regex_constants::basic))); - VERIFY(!regex_match("]", regex("[^]]", regex_constants::basic))); + VERIFY(regex_match_debug ("]", regex("[]]", regex_constants::basic))); + VERIFY(!regex_match_debug ("]", regex("[^]]", regex_constants::basic))); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_01.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_01.cc index 668309d..34cfa55 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_01.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_01.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("aaba"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_00_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_00_03.cc index 1878386..36f032d 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_00_03.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_00_03.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("aa"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc index 93826a7..812e3ef 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("aa"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_02_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_02_03.cc index 91bc101..0924ed0 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_02_03.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/basic/string_range_02_03.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("aa"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc index 5f4b1d1..5a762ab6 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc @@ -24,6 +24,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; // libstdc++/53622 void @@ -36,7 +40,7 @@ test01() std::string target("zxcv/onetwoabc"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == 2 ); VERIFY( m[0].matched == true ); VERIFY( std::string(m[0].first, m[0].second) == "zxcv/onetwoabc" ); @@ -49,7 +53,7 @@ test01() std::string target("zxcv/onetwoabc"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == 3 ); VERIFY( m[0].matched == true ); VERIFY( std::string(m[0].first, m[0].second) == "zxcv/onetwoabc" ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc index b9a72c9..dc177e5 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc @@ -24,6 +24,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; #include <iostream> // libstdc++/57173 @@ -37,7 +41,7 @@ test01() std::string target("/asdf/qwerty"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == 2 ); VERIFY( std::string(m[1].first, m[1].second) == "/qwerty"); } @@ -46,7 +50,7 @@ test01() std::string target("/asdf/qwerty"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == 3 ); VERIFY( std::string(m[1].first, m[1].second) == "/qwerty"); } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/58576.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/58576.cc index 1a1365c..f745ef3 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/58576.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/58576.cc @@ -24,13 +24,15 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; // libstdc++/58576 void test01() { - using namespace std; - bool test __attribute__((unused)) = true; string domain_name = "valid.hostname.org"; @@ -74,9 +76,9 @@ test01() }; try { - VERIFY(regex_match( domain_name, m, fqdn_regex )); + VERIFY(regex_match_debug( domain_name, m, fqdn_regex )); VERIFY(m.size() == sizeof(sol) / sizeof(*sol)); - for (int i = 0; i < (int)m.size(); i++) { + for (size_t i = 0; i < m.size(); i++) { string s(m[i].first, m[i].second); VERIFY(s == sol[i]); } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/anymatcher.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/anymatcher.cc index 6e6095b..866ff7f 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/anymatcher.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/anymatcher.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -37,7 +39,7 @@ test01() {\ regex re(res);\ string st(s);\ - VERIFY(!regex_match(st, re));\ + VERIFY(!regex_match_debug(st, re));\ } TEST(".", "\0"); TEST(".", "\n"); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc index 321ce35..05a5772 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/empty_range.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/empty_range.cc index 3c48d35..9f09c74 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/empty_range.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/empty_range.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -33,10 +35,10 @@ test01() { bool test __attribute__((unused)) = true; - VERIFY(!regex_match("x", regex("[]"))); - VERIFY(regex_match("x", regex("[^]"))); - VERIFY(!regex_match("]", regex("[]]"))); - VERIFY(!regex_match("]", regex("[^]]"))); + VERIFY(!regex_match_debug("x", regex("[]"))); + VERIFY(regex_match_debug("x", regex("[^]"))); + VERIFY(!regex_match_debug("]", regex("[]]"))); + VERIFY(!regex_match_debug("]", regex("[^]]"))); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/emptygroup.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/emptygroup.cc index 1dc8f63..77fd43c 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/emptygroup.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/emptygroup.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -37,7 +39,7 @@ test01() regex re("()*\\1"); cmatch m; const char s[] = ""; - VERIFY( regex_match(s, m, re) ); + VERIFY( regex_match_debug(s, m, re) ); VERIFY( m.size() == 2 ); VERIFY( m[0].matched ); VERIFY( m[1].matched ); @@ -46,7 +48,7 @@ test01() regex re("()*"); cmatch m; const char s[] = ""; - VERIFY( regex_match(s, m, re) ); + VERIFY( regex_match_debug(s, m, re) ); } } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/hex.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/hex.cc index a73b742..b103061 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/hex.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/hex.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -33,7 +35,7 @@ test01() { bool test __attribute__((unused)) = true; - VERIFY(regex_match(":", regex("\\x3a"))); + VERIFY(regex_match_debug(":", regex("\\x3a"))); try { regex("\\u400x"); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/quoted_char.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/quoted_char.cc index b54f561..118c472 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/quoted_char.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/quoted_char.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -33,15 +35,15 @@ test01() { bool test __attribute__((unused)) = true; - VERIFY(regex_match("01", regex("\\d*"))); - VERIFY(regex_match("asdfjkl", regex("\\D*"))); - VERIFY(!regex_match("asdfjkl0", regex("\\D*"))); - VERIFY(regex_match("\r\t\v\f ", regex("\\s*"))); - VERIFY(regex_match("asdfjkl", regex("\\S*"))); - VERIFY(!regex_match("asdfjkl\r", regex("\\S*"))); - VERIFY(regex_match("_az", regex("\\w*"))); - VERIFY(regex_match("!@#$%", regex("\\W*"))); - VERIFY(!regex_match("_01234", regex("\\W*"))); + VERIFY(regex_match_debug("01", regex("\\d*"))); + VERIFY(regex_match_debug("asdfjkl", regex("\\D*"))); + VERIFY(!regex_match_debug("asdfjkl0", regex("\\D*"))); + VERIFY(regex_match_debug("\r\t\v\f ", regex("\\s*"))); + VERIFY(regex_match_debug("asdfjkl", regex("\\S*"))); + VERIFY(!regex_match_debug("asdfjkl\r", regex("\\S*"))); + VERIFY(regex_match_debug("_az", regex("\\w*"))); + VERIFY(regex_match_debug("!@#$%", regex("\\W*"))); + VERIFY(!regex_match_debug("_01234", regex("\\W*"))); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc index c574908..323a2ff 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -37,7 +39,7 @@ test01() {\ wregex re(res);\ wstring st(s);\ - VERIFY(!regex_match(st, re));\ + VERIFY(!regex_match_debug(st, re));\ } TESTL(L".", L"\u2028"); TESTL(L".", L"\u2029"); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc index f9561be..876a7df 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -33,7 +35,7 @@ test01() { bool test __attribute__((unused)) = true; - VERIFY(regex_match(L"\u1234", wregex(L"\\u1234"))); + VERIFY(regex_match_debug(L"\u1234", wregex(L"\\u1234"))); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc index 5d83785..c5f066b 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -33,33 +37,33 @@ test01() { std::regex re("pre/[za-x]", std::regex::extended); - VERIFY( std::regex_match("pre/z", re) ); - VERIFY( std::regex_match("pre/a", re) ); - VERIFY( !std::regex_match("pre/y", re) ); + VERIFY( regex_match_debug("pre/z", re) ); + VERIFY( regex_match_debug("pre/a", re) ); + VERIFY( !regex_match_debug("pre/y", re) ); } { std::regex re("pre/[[:uPPer:]]", std::regex::extended); - VERIFY( std::regex_match("pre/Z", re) ); - VERIFY( !std::regex_match("pre/_", re) ); - VERIFY( !std::regex_match("pre/a", re) ); - VERIFY( !std::regex_match("pre/0", re) ); + VERIFY( regex_match_debug("pre/Z", re) ); + VERIFY( !regex_match_debug("pre/_", re) ); + VERIFY( !regex_match_debug("pre/a", re) ); + VERIFY( !regex_match_debug("pre/0", re) ); } { std::regex re("pre/[[:lOWer:]]", std::regex::extended | std::regex::icase); - VERIFY( std::regex_match("pre/Z", re) ); - VERIFY( std::regex_match("pre/a", re) ); + VERIFY( regex_match_debug("pre/Z", re) ); + VERIFY( regex_match_debug("pre/a", re) ); } { std::regex re("pre/[[:w:][.tilde.]]", std::regex::extended); - VERIFY( std::regex_match("pre/~", re) ); - VERIFY( std::regex_match("pre/_", re) ); - VERIFY( std::regex_match("pre/a", re) ); - VERIFY( std::regex_match("pre/0", re) ); + VERIFY( regex_match_debug("pre/~", re) ); + VERIFY( regex_match_debug("pre/_", re) ); + VERIFY( regex_match_debug("pre/a", re) ); + VERIFY( regex_match_debug("pre/0", re) ); } { std::regex re("pre/[[=a=]]", std::regex::extended); - VERIFY( std::regex_match("pre/a", re) ); - VERIFY( std::regex_match("pre/A", re) ); + VERIFY( regex_match_debug("pre/a", re) ); + VERIFY( regex_match_debug("pre/A", re) ); } } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_plus.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_plus.cc index 375f34b..32bc24f 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_plus.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_plus.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() const char target[] = "aa"; std::cmatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( re.mark_count() == 1 ); VERIFY( m.size() == re.mark_count()+1 ); @@ -53,9 +57,9 @@ test01() VERIFY( m[1].second == target+sizeof(target)-1 ); VERIFY( m[1].matched == true ); - VERIFY(!std::regex_match("", std::regex("a+", std::regex::extended))); - VERIFY(std::regex_match("a", std::regex("a+", std::regex::extended))); - VERIFY(std::regex_match("aa", std::regex("a+", std::regex::extended))); + VERIFY(!regex_match_debug("", std::regex("a+", std::regex::extended))); + VERIFY(regex_match_debug("a", std::regex("a+", std::regex::extended))); + VERIFY(regex_match_debug("aa", std::regex("a+", std::regex::extended))); } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_questionmark.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_questionmark.cc index 79b52a8..90e9eaf 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_questionmark.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_questionmark.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() char target[] = "a"; std::cmatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( re.mark_count() == 1 ); VERIFY( m.size() == re.mark_count()+1 ); @@ -53,9 +57,9 @@ test01() VERIFY( m[1].second == target+sizeof(target)-1 ); VERIFY( m[1].matched == true ); - VERIFY(std::regex_match("", std::regex("a?", std::regex::extended))); - VERIFY(std::regex_match("a", std::regex("a?", std::regex::extended))); - VERIFY(!std::regex_match("aa", std::regex("a?", std::regex::extended))); + VERIFY(regex_match_debug("", std::regex("a?", std::regex::extended))); + VERIFY(regex_match_debug("a", std::regex("a?", std::regex::extended))); + VERIFY(!regex_match_debug("aa", std::regex("a?", std::regex::extended))); } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_range.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_range.cc index 62f825a..f9f7b6a 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_range.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_range.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -35,29 +37,29 @@ test01() regex re; re.assign("(ab){3}", std::regex::extended); - VERIFY(!regex_match("abab", re)); - VERIFY(regex_match("ababab", re)); - VERIFY(!regex_match("abababab", re)); + VERIFY(!regex_match_debug("abab", re)); + VERIFY(regex_match_debug("ababab", re)); + VERIFY(!regex_match_debug("abababab", re)); re.assign("(ab){3,}", std::regex::extended); - VERIFY(!regex_match("abab", re)); - VERIFY(regex_match("ababab", re)); - VERIFY(regex_match("abababab", re)); - VERIFY(regex_match("ababababab", re)); + VERIFY(!regex_match_debug("abab", re)); + VERIFY(regex_match_debug("ababab", re)); + VERIFY(regex_match_debug("abababab", re)); + VERIFY(regex_match_debug("ababababab", re)); re.assign("(ab){0,3}", std::regex::extended); - VERIFY(regex_match("", re)); - VERIFY(regex_match("ab", re)); - VERIFY(regex_match("abab", re)); - VERIFY(regex_match("ababab", re)); - VERIFY(!regex_match("abababab", re)); + VERIFY(regex_match_debug("", re)); + VERIFY(regex_match_debug("ab", re)); + VERIFY(regex_match_debug("abab", re)); + VERIFY(regex_match_debug("ababab", re)); + VERIFY(!regex_match_debug("abababab", re)); re.assign("(a|b){0,2}", std::regex::extended); - VERIFY(regex_match("", re)); - VERIFY(regex_match("a", re)); - VERIFY(regex_match("b", re)); - VERIFY(regex_match("aa", re)); - VERIFY(regex_match("ab", re)); - VERIFY(regex_match("ba", re)); - VERIFY(regex_match("bb", re)); - VERIFY(!regex_match("aaa", re)); + VERIFY(regex_match_debug("", re)); + VERIFY(regex_match_debug("a", re)); + VERIFY(regex_match_debug("b", re)); + VERIFY(regex_match_debug("aa", re)); + VERIFY(regex_match_debug("ab", re)); + VERIFY(regex_match_debug("ba", re)); + VERIFY(regex_match_debug("bb", re)); + VERIFY(!regex_match_debug("aaa", re)); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_any.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_any.cc index 57628f1..cd87039 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_any.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_any.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("aaba"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_dispatch_01.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_dispatch_01.cc index 4634c7d..50141f0 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_dispatch_01.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_dispatch_01.cc @@ -38,10 +38,12 @@ template<typename _Bi_iter, typename _Alloc, regex_constants::match_flag_type __flags = regex_constants::match_default) { + using namespace __detail; auto& __res = (vector<sub_match<_Bi_iter>, _Alloc>&)(__m); VERIFY( (dynamic_cast - <__detail::_DFSExecutor<_Bi_iter, _Alloc, _Ch_type, _Rx_traits>*> - (&*__detail::__get_executor(__s, __e, __res, __re, __flags)) + <_DFSExecutor<_Bi_iter, _Alloc, _Ch_type, _Rx_traits>*> + (&*__get_executor<_Bi_iter, _Alloc, _Ch_type, _Rx_traits, + _RegexExecutorPolicy::_S_auto>(__s, __e, __res, __re, __flags)) != nullptr) ); } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_00_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_00_03.cc index e10dba8..e483b0a 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_00_03.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_00_03.cc @@ -25,6 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; void test01() @@ -35,7 +38,7 @@ test01() std::string target("aa"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_01_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_01_03.cc index e715290..3879fc4 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_01_03.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_01_03.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("aa"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_02_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_02_03.cc index 62793b4..c2ebdf8 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_02_03.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/string_range_02_03.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("aa"); std::smatch m; - VERIFY( std::regex_match(target, m, re) ); + VERIFY( regex_match_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc index 6ab48ca..ba0ecd5 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc @@ -26,6 +26,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -37,7 +41,7 @@ test01() re2.imbue(std::locale("de_DE.UTF-8")); re2.assign(L"[[:upper:]]*", std::regex::extended); std::wsmatch m2; - VERIFY(std::regex_match(str2, m2, re2)); + VERIFY(regex_match_debug(str2, m2, re2)); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/basic/string_01.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/basic/string_01.cc index ee487f1..fed8e7d 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/basic/string_01.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/basic/string_01.cc @@ -25,6 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() @@ -35,7 +39,7 @@ test01() std::string target("xxasdfyy"); std::smatch m; - VERIFY( std::regex_search(target, m, re) ); + VERIFY( regex_search_debug(target, m, re) ); VERIFY( m.size() == re.mark_count()+1 ); VERIFY( m.empty() == false ); diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc index 3064b3b..f7bce80 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -33,21 +35,21 @@ test01() { bool test __attribute__((unused)) = true; - VERIFY(!regex_search("2123456", regex("^1234"))); - VERIFY(regex_search("123456", regex("^1234"))); - VERIFY(regex_search("123456", regex("(5|^)1234"))); - VERIFY(regex_search("5123456", regex("(5|^)1234"))); - VERIFY(!regex_search("1234562", regex("3456$"))); - VERIFY(regex_search("123456", regex("3456$"))); - VERIFY(!regex_search("123456", regex("(?=1234)56"))); - VERIFY(regex_search("123456", regex("(?=1234)123456"))); - VERIFY(regex_search("123456", regex("(?!1234)56"))); - VERIFY(!regex_search("123456", regex("(?!1234)123456"))); + VERIFY(!regex_search_debug("2123456", regex("^1234"))); + VERIFY(regex_search_debug("123456", regex("^1234"))); + VERIFY(regex_search_debug("123456", regex("(5|^)1234"))); + VERIFY(regex_search_debug("5123456", regex("(5|^)1234"))); + VERIFY(!regex_search_debug("1234562", regex("3456$"))); + VERIFY(regex_search_debug("123456", regex("3456$"))); + VERIFY(!regex_search_debug("123456", regex("(?=1234)56"))); + VERIFY(regex_search_debug("123456", regex("(?=1234)123456"))); + VERIFY(regex_search_debug("123456", regex("(?!1234)56"))); + VERIFY(!regex_search_debug("123456", regex("(?!1234)123456"))); - VERIFY(regex_search("a-", regex("a\\b-"))); - VERIFY(!regex_search("ab", regex("a\\bb"))); - VERIFY(!regex_search("a-", regex("a\\B-"))); - VERIFY(regex_search("ab", regex("a\\Bb"))); + VERIFY(regex_search_debug("a-", regex("a\\b-"))); + VERIFY(!regex_search_debug("ab", regex("a\\bb"))); + VERIFY(!regex_search_debug("a-", regex("a\\B-"))); + VERIFY(regex_search_debug("ab", regex("a\\Bb"))); string s("This is a regular expression"); string sol[] = diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc index 4be406cb..490ab1c 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -35,32 +37,34 @@ test01() cmatch m; regex re("((as)(df))", regex_constants::ECMAScript | regex_constants::nosubs); - VERIFY(regex_search("asdf", m, re)); + VERIFY(regex_search_debug("asdf", m, re)); VERIFY(m.size() == 1); VERIFY(m[0].matched && string(m[0].first, m[0].second) == "asdf"); - VERIFY( regex_search("a", regex("^a"))); - VERIFY(!regex_search("a", regex("^a"), regex_constants::match_not_bol)); - VERIFY( regex_search("a", regex("a$"))); - VERIFY(!regex_search("a", regex("a$"), regex_constants::match_not_eol)); - VERIFY( regex_search("a", regex("\\ba"))); - VERIFY(!regex_search("a", regex("\\ba"), regex_constants::match_not_bow)); - VERIFY( regex_search("a", regex("a\\b"))); - VERIFY(!regex_search("a", regex("a\\b"), regex_constants::match_not_eow)); - VERIFY( regex_search("", regex(""))); - VERIFY(!regex_search("", regex(""), regex_constants::match_not_null)); - VERIFY( regex_search("", regex("^$"))); - VERIFY(!regex_search("", regex("^$"), regex_constants::match_not_null)); - VERIFY( regex_search("aaa", m, regex("a*?"), - regex_constants::match_not_null)); + VERIFY( regex_search_debug("a", regex("^a"))); + VERIFY(!regex_search_debug("a", regex("^a"), regex_constants::match_not_bol)); + VERIFY( regex_search_debug("a", regex("a$"))); + VERIFY(!regex_search_debug("a", regex("a$"), regex_constants::match_not_eol)); + VERIFY( regex_search_debug("a", regex("\\ba"))); + VERIFY(!regex_search_debug("a", regex("\\ba"), + regex_constants::match_not_bow)); + VERIFY( regex_search_debug("a", regex("a\\b"))); + VERIFY(!regex_search_debug("a", regex("a\\b"), + regex_constants::match_not_eow)); + VERIFY( regex_search_debug("", regex(""))); + VERIFY(!regex_search_debug("", regex(""), regex_constants::match_not_null)); + VERIFY( regex_search_debug("", regex("^$"))); + VERIFY(!regex_search_debug("", regex("^$"), regex_constants::match_not_null)); + VERIFY( regex_search_debug("aaa", m, regex("a*?"), + regex_constants::match_not_null)); VERIFY(m[0].matched && string(m[0].first, m[0].second) == "a"); - VERIFY( regex_search("asdf", regex("sdf"))); - VERIFY(!regex_search("asdf", regex("sdf"), - regex_constants::match_continuous)); - VERIFY( regex_search(" a"+1, regex("\\ba"), - regex_constants::match_prev_avail)); - VERIFY( regex_search("ba"+1, regex("\\Ba"), - regex_constants::match_prev_avail)); + VERIFY( regex_search_debug("asdf", regex("sdf"))); + VERIFY(!regex_search_debug("asdf", regex("sdf"), + regex_constants::match_continuous)); + VERIFY( regex_search_debug(" a"+1, regex("\\ba"), + regex_constants::match_prev_avail)); + VERIFY( regex_search_debug("ba"+1, regex("\\Ba"), + regex_constants::match_prev_avail)); } int diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/greedy.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/greedy.cc index ad37ec8..107ced0 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/greedy.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/greedy.cc @@ -25,7 +25,9 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> +using namespace __gnu_test; using namespace std; void @@ -35,30 +37,30 @@ test01() cmatch m; #define TEST(i, s) VERIFY(m[i].matched && string(m[i].first, m[i].second) == s) - VERIFY(regex_search("aaaa", m, regex("a*"))); + VERIFY(regex_search_debug("aaaa", m, regex("a*"))); TEST(0, "aaaa"); - VERIFY(regex_search("aaaa", m, regex("a*?"))); + VERIFY(regex_search_debug("aaaa", m, regex("a*?"))); TEST(0, ""); - VERIFY(regex_search("aaaa", m, regex("a+"))); + VERIFY(regex_search_debug("aaaa", m, regex("a+"))); TEST(0, "aaaa"); - VERIFY(regex_search("aaaa", m, regex("a+?"))); + VERIFY(regex_search_debug("aaaa", m, regex("a+?"))); TEST(0, "a"); - VERIFY(regex_search("a", m, regex("a?"))); + VERIFY(regex_search_debug("a", m, regex("a?"))); TEST(0, "a"); - VERIFY(regex_search("a", m, regex("a??"))); + VERIFY(regex_search_debug("a", m, regex("a??"))); TEST(0, ""); - VERIFY(regex_search("", m, regex("a??"))); + VERIFY(regex_search_debug("", m, regex("a??"))); TEST(0, ""); - VERIFY(regex_search("aaaa", m, regex("(a+)(a+)"))); + VERIFY(regex_search_debug("aaaa", m, regex("(a+)(a+)"))); TEST(1, "aaa"); TEST(2, "a"); - VERIFY(regex_search("aaaa", m, regex("(a+?)(a+)"))); + VERIFY(regex_search_debug("aaaa", m, regex("(a+?)(a+)"))); TEST(1, "a"); TEST(2, "aaa"); - VERIFY(regex_search("aaaa", m, regex("(a+?)(a+)"))); + VERIFY(regex_search_debug("aaaa", m, regex("(a+?)(a+)"))); TEST(1, "a"); TEST(2, "aaa"); - VERIFY(regex_search("aaaa", m, regex("(a+?)(a+?)"))); + VERIFY(regex_search_debug("aaaa", m, regex("(a+?)(a+?)"))); TEST(1, "a"); TEST(2, "a"); } diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc index ec25875..c07e7ef 100644 --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc @@ -25,13 +25,17 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> + +using namespace __gnu_test; +using namespace std; void test01() { bool test __attribute__((unused)) = true; - VERIFY(std::regex_search("", std::regex(""))); + VERIFY(regex_search_debug("", std::regex(""))); } int diff --git a/libstdc++-v3/testsuite/28_regex/match_results/format.cc b/libstdc++-v3/testsuite/28_regex/match_results/format.cc index be08016..659ffdc 100644 --- a/libstdc++-v3/testsuite/28_regex/match_results/format.cc +++ b/libstdc++-v3/testsuite/28_regex/match_results/format.cc @@ -25,8 +25,10 @@ #include <regex> #include <testsuite_hooks.h> +#include <testsuite_regex.h> using namespace std; +using namespace __gnu_test; void test01() @@ -34,8 +36,8 @@ test01() bool test __attribute__((unused)) = true; cmatch m; - VERIFY(regex_search("*** this is a string !!!", m, - regex("(\\w+) (\\w+) (\\w+) (\\w+)"))); + VERIFY(regex_search_debug("*** this is a string !!!", m, + regex("(\\w+) (\\w+) (\\w+) (\\w+)"))); VERIFY(m.format("$&|$`|$3|$4|$2|$1|$'$$$") == "this is a string|*** |a|string|is|this| !!!$$"); VERIFY(m.format("&|\\3|\\4|\\2|\\1|\\", |