summaryrefslogtreecommitdiff
path: root/test/std/re
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/re')
-rw-r--r--test/std/re/re.alg/re.alg.match/awk.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.match/basic.fail.cpp22
-rw-r--r--test/std/re/re.alg/re.alg.match/basic.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.match/ecma.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.match/egrep.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.match/extended.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.match/grep.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp3
-rw-r--r--test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.replace/test1.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.replace/test2.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.replace/test3.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.replace/test4.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.replace/test5.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.replace/test6.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.search/awk.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.search/backup.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.search/basic.fail.cpp22
-rw-r--r--test/std/re/re.alg/re.alg.search/basic.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.search/ecma.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.search/egrep.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.search/extended.pass.cpp1
-rw-r--r--test/std/re/re.alg/re.alg.search/grep.pass.cpp6
-rw-r--r--test/std/re/re.alg/re.alg.search/lookahead.pass.cpp3
-rw-r--r--test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp1
-rw-r--r--test/std/re/re.badexp/regex_error.pass.cpp1
-rw-r--r--test/std/re/re.const/re.err/error_type.pass.cpp1
-rw-r--r--test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp1
-rw-r--r--test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp5
-rw-r--r--test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp5
-rw-r--r--test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp12
-rw-r--r--test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.regiter/types.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp10
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp10
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp10
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp10
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp1
-rw-r--r--test/std/re/re.iter/re.tokiter/types.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign.pass.cpp3
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/copy.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/il.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/ptr.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.assign/string.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.const/constants.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp5
-rw-r--r--test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp5
-rw-r--r--test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp5
-rw-r--r--test/std/re/re.regex/re.regex.construct/copy.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/default.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/ptr.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/string.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.locale/imbue.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp1
-rw-r--r--test/std/re/re.regex/re.regex.swap/swap.pass.cpp1
-rw-r--r--test/std/re/re.regex/types.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/begin_end.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/index.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/length.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/position.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/prefix.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/str.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.acc/suffix.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.all/get_allocator.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.const/allocator.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.const/default.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.form/form1.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.form/form2.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.form/form3.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.form/form4.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.nonmember/equal.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.size/empty.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.size/max_size.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.state/ready.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.swap/member_swap.pass.cpp1
-rw-r--r--test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp1
-rw-r--r--test/std/re/re.results/types.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.members/default.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.members/length.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.members/str.pass.cpp1
-rw-r--r--test/std/re/re.submatch/re.submatch.op/compare.pass.cpp5
-rw-r--r--test/std/re/re.submatch/re.submatch.op/stream.pass.cpp1
-rw-r--r--test/std/re/re.submatch/types.pass.cpp1
-rw-r--r--test/std/re/re.syn/cmatch.pass.cpp1
-rw-r--r--test/std/re/re.syn/cregex_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/cregex_token_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/csub_match.pass.cpp1
-rw-r--r--test/std/re/re.syn/regex.pass.cpp1
-rw-r--r--test/std/re/re.syn/smatch.pass.cpp1
-rw-r--r--test/std/re/re.syn/sregex_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/sregex_token_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/ssub_match.pass.cpp1
-rw-r--r--test/std/re/re.syn/wcmatch.pass.cpp1
-rw-r--r--test/std/re/re.syn/wcregex_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/wcregex_token_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/wcsub_match.pass.cpp1
-rw-r--r--test/std/re/re.syn/wregex.pass.cpp1
-rw-r--r--test/std/re/re.syn/wsmatch.pass.cpp1
-rw-r--r--test/std/re/re.syn/wsregex_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/wsregex_token_iterator.pass.cpp1
-rw-r--r--test/std/re/re.syn/wssub_match.pass.cpp1
-rw-r--r--test/std/re/re.traits/default.pass.cpp1
-rw-r--r--test/std/re/re.traits/getloc.pass.cpp1
-rw-r--r--test/std/re/re.traits/imbue.pass.cpp1
-rw-r--r--test/std/re/re.traits/isctype.pass.cpp5
-rw-r--r--test/std/re/re.traits/length.pass.cpp1
-rw-r--r--test/std/re/re.traits/lookup_classname.pass.cpp14
-rw-r--r--test/std/re/re.traits/lookup_collatename.pass.cpp3
-rw-r--r--test/std/re/re.traits/transform.pass.cpp2
-rw-r--r--test/std/re/re.traits/transform_primary.pass.cpp3
-rw-r--r--test/std/re/re.traits/translate.pass.cpp1
-rw-r--r--test/std/re/re.traits/translate_nocase.pass.cpp1
-rw-r--r--test/std/re/re.traits/types.pass.cpp1
-rw-r--r--test/std/re/re.traits/value.pass.cpp1
141 files changed, 218 insertions, 69 deletions
diff --git a/test/std/re/re.alg/re.alg.match/awk.pass.cpp b/test/std/re/re.alg/re.alg.match/awk.pass.cpp
index e4b2f3ec50143..a32b2ca0ae320 100644
--- a/test/std/re/re.alg/re.alg.match/awk.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/awk.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.match/basic.fail.cpp b/test/std/re/re.alg/re.alg.match/basic.fail.cpp
index 82f8e3b7ee898..04ce8fdd201bd 100644
--- a/test/std/re/re.alg/re.alg.match/basic.fail.cpp
+++ b/test/std/re/re.alg/re.alg.match/basic.fail.cpp
@@ -9,21 +9,22 @@
// <regex>
-// template <class ST, class SA, class Allocator, class charT, class traits>
-// bool regex_match(const basic_string<charT, ST, SA>&&,
+// template <class ST, class SA, class Allocator, class charT, class traits>
+// bool regex_match(const basic_string<charT, ST, SA>&&,
// match_results<
-// typename basic_string<charT, ST, SA>::const_iterator,
-// Allocator>&,
-// const basic_regex<charT, traits>&,
-// regex_constants::match_flag_type =
+// typename basic_string<charT, ST, SA>::const_iterator,
+// Allocator>&,
+// const basic_regex<charT, traits>&,
+// regex_constants::match_flag_type =
// regex_constants::match_default) = delete;
-#if __cplusplus <= 201402L
-#error
-#else
-
#include <regex>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER < 14
+#error
+#endif
int main()
{
@@ -33,4 +34,3 @@ int main()
std::regex_match(std::string("abcde"), m, re);
}
}
-#endif
diff --git a/test/std/re/re.alg/re.alg.match/basic.pass.cpp b/test/std/re/re.alg/re.alg.match/basic.pass.cpp
index 2ddc07a2000fa..901bf90e63860 100644
--- a/test/std/re/re.alg/re.alg.match/basic.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/basic.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.match/ecma.pass.cpp b/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
index 785a61c47f11d..a4568f60167c7 100644
--- a/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.match/egrep.pass.cpp b/test/std/re/re.alg/re.alg.match/egrep.pass.cpp
index dd2e6038dc31c..53cff850e2d4c 100644
--- a/test/std/re/re.alg/re.alg.match/egrep.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/egrep.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.alg/re.alg.match/extended.pass.cpp b/test/std/re/re.alg/re.alg.match/extended.pass.cpp
index 9ca31d1814a65..5e08d0ac5fdba 100644
--- a/test/std/re/re.alg/re.alg.match/extended.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/extended.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.match/grep.pass.cpp b/test/std/re/re.alg/re.alg.match/grep.pass.cpp
index 2dc0966d6b8de..efd33cb11e03c 100644
--- a/test/std/re/re.alg/re.alg.match/grep.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/grep.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp b/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp
index 949739b992cb3..95f400ce88c98 100644
--- a/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/lookahead_capture.pass.cpp
@@ -16,12 +16,13 @@
// const basic_regex<charT, traits>& e,
// regex_constants::match_flag_type flags = regex_constants::match_default);
-// std::regex in ECMAScript mode should not ignore capture groups inside lookahead assertions.
+// std::regex in ECMAScript mode should not ignore capture groups inside lookahead assertions.
// For example, matching /(?=(a))(a)/ to "a" should yield two captures: \1 = "a", \2 = "a"
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp b/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp
index 0b4c6948140ec..59b2832c4580a 100644
--- a/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp
+++ b/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp
@@ -21,6 +21,7 @@
#include <string>
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test1()
diff --git a/test/std/re/re.alg/re.alg.replace/test1.pass.cpp b/test/std/re/re.alg/re.alg.replace/test1.pass.cpp
index 9fd84fdc1f6e9..13cc8f2a0dd21 100644
--- a/test/std/re/re.alg/re.alg.replace/test1.pass.cpp
+++ b/test/std/re/re.alg/re.alg.replace/test1.pass.cpp
@@ -22,6 +22,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.alg/re.alg.replace/test2.pass.cpp b/test/std/re/re.alg/re.alg.replace/test2.pass.cpp
index 63a4ed56933d1..679644f09b680 100644
--- a/test/std/re/re.alg/re.alg.replace/test2.pass.cpp
+++ b/test/std/re/re.alg/re.alg.replace/test2.pass.cpp
@@ -22,6 +22,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.alg/re.alg.replace/test3.pass.cpp b/test/std/re/re.alg/re.alg.replace/test3.pass.cpp
index d1167860646f9..c8b8c649d1da8 100644
--- a/test/std/re/re.alg/re.alg.replace/test3.pass.cpp
+++ b/test/std/re/re.alg/re.alg.replace/test3.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.alg/re.alg.replace/test4.pass.cpp b/test/std/re/re.alg/re.alg.replace/test4.pass.cpp
index fba1bc19546a9..251eae8f6e201 100644
--- a/test/std/re/re.alg/re.alg.replace/test4.pass.cpp
+++ b/test/std/re/re.alg/re.alg.replace/test4.pass.cpp
@@ -18,6 +18,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.alg/re.alg.replace/test5.pass.cpp b/test/std/re/re.alg/re.alg.replace/test5.pass.cpp
index 7190e41d52288..53720d6f72ae7 100644
--- a/test/std/re/re.alg/re.alg.replace/test5.pass.cpp
+++ b/test/std/re/re.alg/re.alg.replace/test5.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.alg/re.alg.replace/test6.pass.cpp b/test/std/re/re.alg/re.alg.replace/test6.pass.cpp
index b017800773030..a00ac75193d54 100644
--- a/test/std/re/re.alg/re.alg.replace/test6.pass.cpp
+++ b/test/std/re/re.alg/re.alg.replace/test6.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.alg/re.alg.search/awk.pass.cpp b/test/std/re/re.alg/re.alg.search/awk.pass.cpp
index 7fc1b3fcc233d..05d1f59e147af 100644
--- a/test/std/re/re.alg/re.alg.search/awk.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/awk.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.search/backup.pass.cpp b/test/std/re/re.alg/re.alg.search/backup.pass.cpp
index 7da58608705b8..f33b844bed9c5 100644
--- a/test/std/re/re.alg/re.alg.search/backup.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/backup.pass.cpp
@@ -20,6 +20,7 @@
#include <string>
#include <list>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.alg/re.alg.search/basic.fail.cpp b/test/std/re/re.alg/re.alg.search/basic.fail.cpp
index 9ab6a21ad9dc5..430b0a3aa4c32 100644
--- a/test/std/re/re.alg/re.alg.search/basic.fail.cpp
+++ b/test/std/re/re.alg/re.alg.search/basic.fail.cpp
@@ -9,21 +9,22 @@
// <regex>
-// template <class ST, class SA, class Allocator, class charT, class traits>
-// bool regex_search(const basic_string<charT, ST, SA>&&,
+// template <class ST, class SA, class Allocator, class charT, class traits>
+// bool regex_search(const basic_string<charT, ST, SA>&&,
// match_results<
-// typename basic_string<charT, ST, SA>::const_iterator,
-// Allocator>&,
-// const basic_regex<charT, traits>&,
-// regex_constants::match_flag_type =
+// typename basic_string<charT, ST, SA>::const_iterator,
+// Allocator>&,
+// const basic_regex<charT, traits>&,
+// regex_constants::match_flag_type =
// regex_constants::match_default) = delete;
-#if __cplusplus <= 201402L
-#error
-#else
-
#include <regex>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER < 14
+#error
+#endif
int main()
{
@@ -33,4 +34,3 @@ int main()
std::regex_search(std::string("abcde"), m, re);
}
}
-#endif
diff --git a/test/std/re/re.alg/re.alg.search/basic.pass.cpp b/test/std/re/re.alg/re.alg.search/basic.pass.cpp
index bdfcd9cc9bcd7..f5157f563755f 100644
--- a/test/std/re/re.alg/re.alg.search/basic.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/basic.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.search/ecma.pass.cpp b/test/std/re/re.alg/re.alg.search/ecma.pass.cpp
index fb9fc26a281a9..d6a3da6ea076c 100644
--- a/test/std/re/re.alg/re.alg.search/ecma.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/ecma.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.search/egrep.pass.cpp b/test/std/re/re.alg/re.alg.search/egrep.pass.cpp
index 1dffed44f2275..0bf8386119ee3 100644
--- a/test/std/re/re.alg/re.alg.search/egrep.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/egrep.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.alg/re.alg.search/extended.pass.cpp b/test/std/re/re.alg/re.alg.search/extended.pass.cpp
index 81eef2f9e4b95..88af3b908815a 100644
--- a/test/std/re/re.alg/re.alg.search/extended.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/extended.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "platform_support.h" // locale name macros
diff --git a/test/std/re/re.alg/re.alg.search/grep.pass.cpp b/test/std/re/re.alg/re.alg.search/grep.pass.cpp
index 9d74c2417d2da..136f9958c9b21 100644
--- a/test/std/re/re.alg/re.alg.search/grep.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/grep.pass.cpp
@@ -34,9 +34,9 @@ extern "C" void LLVMFuzzerTestOneInput(const char *data)
std::string s((const char *)data, size);
std::regex re(s, flag);
std::regex_match(s, re);
- }
- catch (std::regex_error &ex) {}
- }
+ }
+ catch (std::regex_error &) {}
+ }
}
diff --git a/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp b/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp
index 9f5f9540165a0..93424e188432f 100644
--- a/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/lookahead.pass.cpp
@@ -20,8 +20,9 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
-int main()
+int main()
{
assert(!std::regex_search("ab", std::regex("(?=^)b")));
assert(!std::regex_search("ab", std::regex("a(?=^)b")));
diff --git a/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp b/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp
index ef9cec5f736e8..600425d8de359 100644
--- a/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp
+++ b/test/std/re/re.alg/re.alg.search/no_update_pos.pass.cpp
@@ -18,6 +18,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.badexp/regex_error.pass.cpp b/test/std/re/re.badexp/regex_error.pass.cpp
index 02fecbda2d95b..f1752716ec75a 100644
--- a/test/std/re/re.badexp/regex_error.pass.cpp
+++ b/test/std/re/re.badexp/regex_error.pass.cpp
@@ -20,6 +20,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.const/re.err/error_type.pass.cpp b/test/std/re/re.const/re.err/error_type.pass.cpp
index 150855beb0a4c..3609d41b9beb3 100644
--- a/test/std/re/re.const/re.err/error_type.pass.cpp
+++ b/test/std/re/re.const/re.err/error_type.pass.cpp
@@ -34,6 +34,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp b/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp
index b48703c7579fb..c7b2a80cd2a4a 100644
--- a/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp
+++ b/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp
@@ -34,6 +34,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp b/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp
index 41ac0cee0d6a5..03e8770dd68d2 100644
--- a/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp
+++ b/test/std/re/re.const/re.matchflag/match_not_bol.pass.cpp
@@ -11,12 +11,13 @@
// <regex>
// match_not_bol:
-// The first character in the sequence [first,last) shall be treated as
-// though it is not at the beginning of a line, so the character ^ in the
+// The first character in the sequence [first,last) shall be treated as
+// though it is not at the beginning of a line, so the character ^ in the
// regular expression shall not match [first,first).
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp b/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp
index 594c9fb984539..1c9b154f1fccb 100644
--- a/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp
+++ b/test/std/re/re.const/re.matchflag/match_not_eol.pass.cpp
@@ -11,12 +11,13 @@
// <regex>
// match_not_eol:
-// The last character in the sequence [first,last) shall be treated as
-// though it is not at the end of a line, so the character "$" in
+// The last character in the sequence [first,last) shall be treated as
+// though it is not at the end of a line, so the character "$" in
// the regular expression shall not match [last,last).
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp b/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
index 1c4f824448a6e..ad6111cc4ee27 100644
--- a/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
+++ b/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
@@ -31,6 +31,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp b/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp
index 208de0e43cec8..24fb3787ed1f4 100644
--- a/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp
+++ b/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.fail.cpp
@@ -17,20 +17,20 @@
// regex_constants::match_flag_type m =
// regex_constants::match_default) = delete;
-#if __cplusplus <= 201402L
-#error
-#else
-
#include <regex>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER < 14
+#error
+#endif
int main()
{
{
const char phone_book[] = "555-1234, 555-2345, 555-3456";
std::cregex_iterator i(
- std::begin(phone_book), std::end(phone_book),
+ std::begin(phone_book), std::end(phone_book),
std::regex("\\d{3}-\\d{4}"));
}
}
-#endif
diff --git a/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp b/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp
index c9fc7a3cd1cc8..c1cabff39d548 100644
--- a/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp
+++ b/test/std/re/re.iter/re.regiter/re.regiter.cnstr/cnstr.pass.cpp
@@ -17,6 +17,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp b/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp
index 9d4766dc876f0..cb44fb37bc897 100644
--- a/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp
+++ b/test/std/re/re.iter/re.regiter/re.regiter.cnstr/default.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp b/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp
index e4933fe16f8e1..800f56434160f 100644
--- a/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp
+++ b/test/std/re/re.iter/re.regiter/re.regiter.deref/deref.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp b/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp
index 3ec0d6c0c3b46..f3b57f6bc9da0 100644
--- a/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp
+++ b/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.regiter/types.pass.cpp b/test/std/re/re.iter/re.regiter/types.pass.cpp
index db1d3eb958bff..5b79957bea241 100644
--- a/test/std/re/re.iter/re.regiter/types.pass.cpp
+++ b/test/std/re/re.iter/re.regiter/types.pass.cpp
@@ -24,6 +24,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp
index 6753b0ad506b0..8f90b23907dca 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.fail.cpp
@@ -18,13 +18,14 @@
// regex_constants::match_flag_type m =
// regex_constants::match_default);
-#if __cplusplus <= 201402L
-#error
-#else
-
#include <regex>
#include <vector>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER < 14
+#error
+#endif
int main()
{
@@ -36,4 +37,3 @@ int main()
std::regex("\\d{3}-\\d{4}"), indices);
}
}
-#endif
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp
index a51b8274bdd84..6d8c2f35e4242 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/array.pass.cpp
@@ -20,6 +20,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp
index 382815e0c1cc1..e71f3a69217eb 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/default.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp
index e58183682ea44..9d538730e8099 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.fail.cpp
@@ -17,12 +17,13 @@
// regex_constants::match_flag_type m =
// regex_constants::match_default);
-#if __cplusplus <= 201402L
-#error
-#else
-
#include <regex>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER < 14
+#error
+#endif
int main()
{
@@ -33,4 +34,3 @@ int main()
std::regex("\\d{3}-\\d{4}"), {-1, 0, 1});
}
}
-#endif
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp
index b40d7eb9224de..6cffc0da9a525 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp
index d0a100a1afcc5..f4601f3ed0335 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.fail.cpp
@@ -16,12 +16,13 @@
// regex_constants::match_flag_type m =
// regex_constants::match_default);
-#if __cplusplus <= 201402L
-#error
-#else
-
#include <regex>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER < 14
+#error
+#endif
int main()
{
@@ -32,4 +33,3 @@ int main()
std::regex("\\d{3}-\\d{4}"), -1);
}
}
-#endif
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp
index d8111363c176e..37fe2d9767ef6 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/int.pass.cpp
@@ -18,6 +18,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp
index 94d8f9667d2ce..d5d5f4c63ceba 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.fail.cpp
@@ -18,12 +18,13 @@
// regex_constants::match_flag_type m =
// regex_constants::match_default);
-#if __cplusplus <= 201402L
-#error
-#else
-
#include <regex>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER < 14
+#error
+#endif
int main()
{
@@ -37,4 +38,3 @@ int main()
std::regex("\\d{3}-\\d{4}"), v);
}
}
-#endif
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp
index b04f5804509f4..473a706dd854f 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/vector.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp
index d6399f1148b4a..49d1b1b7ed547 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.comp/equal.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp
index b096e3c08275f..73ec62cfc67d5 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.deref/deref.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp b/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp
index 727ab7af93760..7d55bc1113fad 100644
--- a/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/re.tokiter.incr/post.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.iter/re.tokiter/types.pass.cpp b/test/std/re/re.iter/re.tokiter/types.pass.cpp
index 89287bdd1d002..b7777fbeefff0 100644
--- a/test/std/re/re.iter/re.tokiter/types.pass.cpp
+++ b/test/std/re/re.iter/re.tokiter/types.pass.cpp
@@ -24,6 +24,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp
index 96cadf166001b..39c3a22ef7257 100644
--- a/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp
@@ -17,6 +17,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.assign/assign.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign.pass.cpp
index 9c5f834b9452a..97208c68c8d6c 100644
--- a/test/std/re/re.regex/re.regex.assign/assign.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/assign.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
@@ -25,7 +26,7 @@ int main()
assert(r2.flags() == std::regex::ECMAScript);
assert(r2.mark_count() == 2);
assert(std::regex_search("ab", r2));
-
+
bool caught = false;
try { r2.assign("(def", std::regex::extended); }
catch(std::regex_error &) { caught = true; }
diff --git a/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp
index 529a64a239a0e..7cd4845f30733 100644
--- a/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/assign_iter_iter_flag.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp
index dd39dee13ffbe..33b9cad18335a 100644
--- a/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/assign_ptr_flag.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp
index 679cd9df17fce..7ec4f77a50529 100644
--- a/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/assign_ptr_size_flag.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp b/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp
index 46f984da04db6..247d27721be77 100644
--- a/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/assign_string_flag.pass.cpp
@@ -17,6 +17,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.assign/copy.pass.cpp b/test/std/re/re.regex/re.regex.assign/copy.pass.cpp
index 2a616ff012c1d..3f212f772a38b 100644
--- a/test/std/re/re.regex/re.regex.assign/copy.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/copy.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.assign/il.pass.cpp b/test/std/re/re.regex/re.regex.assign/il.pass.cpp
index a9d8ada4ff0ef..022170f2d1366 100644
--- a/test/std/re/re.regex/re.regex.assign/il.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/il.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp b/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp
index 4c42f822a1e51..d2af1f9b3d1af 100644
--- a/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/ptr.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.assign/string.pass.cpp b/test/std/re/re.regex/re.regex.assign/string.pass.cpp
index 7f09e5364ac41..65cc4a345ed8e 100644
--- a/test/std/re/re.regex/re.regex.assign/string.pass.cpp
+++ b/test/std/re/re.regex/re.regex.assign/string.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.const/constants.pass.cpp b/test/std/re/re.regex/re.regex.const/constants.pass.cpp
index 85297b91f4337..e699de819b0d8 100644
--- a/test/std/re/re.regex/re.regex.const/constants.pass.cpp
+++ b/test/std/re/re.regex/re.regex.const/constants.pass.cpp
@@ -27,6 +27,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
template <class _Tp>
void where(const _Tp &) {}
diff --git a/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp b/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp
index 4b7e5e6292942..3f1eaf6b959ef 100644
--- a/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/awk_oct.pass.cpp
@@ -16,13 +16,14 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
-int main()
+int main()
{
using std::regex_constants::awk;
assert(std::regex_match("\4", std::regex("\\4", awk)));
assert(std::regex_match("\41", std::regex("\\41", awk)));
assert(std::regex_match("\141", std::regex("\\141", awk)));
- assert(std::regex_match("\1411", std::regex("\\1411", awk)));
+ assert(std::regex_match("\141" "1", std::regex("\\1411", awk)));
}
diff --git a/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp b/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp
index 9459cd74ccff0..3c7e9f5e33c73 100644
--- a/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp
@@ -17,8 +17,9 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
-static bool error_escape_thrown(const char *pat)
+static bool error_escape_thrown(const char *pat)
{
bool result = false;
try {
@@ -29,7 +30,7 @@ static bool error_escape_thrown(const char *pat)
return result;
}
-int main()
+int main()
{
assert(error_escape_thrown("[\\a]"));
assert(error_escape_thrown("\\a"));
diff --git a/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp b/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp
index c21672f02c98f..0692a59542f6b 100644
--- a/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/bad_repeat.pass.cpp
@@ -17,8 +17,9 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
-static bool error_badrepeat_thrown(const char *pat)
+static bool error_badrepeat_thrown(const char *pat)
{
bool result = false;
try {
@@ -29,7 +30,7 @@ static bool error_badrepeat_thrown(const char *pat)
return result;
}
-int main()
+int main()
{
assert(error_badrepeat_thrown("?a"));
assert(error_badrepeat_thrown("*a"));
diff --git a/test/std/re/re.regex/re.regex.construct/copy.pass.cpp b/test/std/re/re.regex/re.regex.construct/copy.pass.cpp
index c2788f0fa2c61..a266289c6a881 100644
--- a/test/std/re/re.regex/re.regex.construct/copy.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/copy.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.construct/default.pass.cpp b/test/std/re/re.regex/re.regex.construct/default.pass.cpp
index d959c1ec58208..f1d7bf7696d91 100644
--- a/test/std/re/re.regex/re.regex.construct/default.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/default.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp
index 70d28df370d11..c1554d6c3ebb7 100644
--- a/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
diff --git a/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp b/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp
index a38e16234191a..4a93d173e6fcf 100644
--- a/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/iter_iter.pass.cpp
@@ -18,6 +18,7 @@
#include <cassert>
#include "test_iterators.h"
+#include "test_macros.h"
template <class Iter>
void
diff --git a/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp
index c4c440e6d2464..347989c5de151 100644
--- a/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/iter_iter_flg.pass.cpp
@@ -19,6 +19,7 @@
#include <cassert>
#include "test_iterators.h"
+#include "test_macros.h"
template <class Iter>
void
diff --git a/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp b/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp
index b99b58b469cf4..05fba020566bc 100644
--- a/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/ptr.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp
index 138e20efbf657..d37b81592b4e7 100644
--- a/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/ptr_flg.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp
index d623a15936f4a..a0ceb70514bfe 100644
--- a/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/ptr_size_flg.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.regex/re.regex.construct/string.pass.cpp b/test/std/re/re.regex/re.regex.construct/string.pass.cpp
index b58b8e03cd208..a8f2e9bf6c20e 100644
--- a/test/std/re/re.regex/re.regex.construct/string.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/string.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class String>
void
diff --git a/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp b/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp
index 768de568e2295..5f87af10224a4 100644
--- a/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp
+++ b/test/std/re/re.regex/re.regex.construct/string_flg.pass.cpp
@@ -17,6 +17,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class String>
void
diff --git a/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp b/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp
index c7ad39414c653..85900488f2351 100644
--- a/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp
+++ b/test/std/re/re.regex/re.regex.locale/imbue.pass.cpp
@@ -19,6 +19,7 @@
#include <locale>
#include <cassert>
+#include "test_macros.h"
#include "platform_support.h" // locale name macros
int main()
diff --git a/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp b/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp
index 9d3c481686e78..7b231726557d6 100644
--- a/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp
+++ b/test/std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/re.regex.swap/swap.pass.cpp b/test/std/re/re.regex/re.regex.swap/swap.pass.cpp
index cda8ef3541a2c..a04c64d4a471e 100644
--- a/test/std/re/re.regex/re.regex.swap/swap.pass.cpp
+++ b/test/std/re/re.regex/re.regex.swap/swap.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.regex/types.pass.cpp b/test/std/re/re.regex/types.pass.cpp
index 02011ac56ebb9..5c0a5920d2013 100644
--- a/test/std/re/re.regex/types.pass.cpp
+++ b/test/std/re/re.regex/types.pass.cpp
@@ -20,6 +20,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.results/re.results.acc/begin_end.pass.cpp b/test/std/re/re.results/re.results.acc/begin_end.pass.cpp
index 80c06f299bd7c..a5ed051265ccd 100644
--- a/test/std/re/re.results/re.results.acc/begin_end.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/begin_end.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp b/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp
index a983c8afc81a7..67ec606e9060b 100644
--- a/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/cbegin_cend.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.acc/index.pass.cpp b/test/std/re/re.results/re.results.acc/index.pass.cpp
index 79d4b9a237887..8118d3c9c3001 100644
--- a/test/std/re/re.results/re.results.acc/index.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/index.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test(std::regex_constants::syntax_option_type syntax)
diff --git a/test/std/re/re.results/re.results.acc/length.pass.cpp b/test/std/re/re.results/re.results.acc/length.pass.cpp
index 91020851a3088..7bf689c5b7909 100644
--- a/test/std/re/re.results/re.results.acc/length.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/length.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.acc/position.pass.cpp b/test/std/re/re.results/re.results.acc/position.pass.cpp
index 2698e2d91693e..b7df2c7c21c97 100644
--- a/test/std/re/re.results/re.results.acc/position.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/position.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.acc/prefix.pass.cpp b/test/std/re/re.results/re.results.acc/prefix.pass.cpp
index 58cdabc24df86..0c8572a0d713d 100644
--- a/test/std/re/re.results/re.results.acc/prefix.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/prefix.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.acc/str.pass.cpp b/test/std/re/re.results/re.results.acc/str.pass.cpp
index 2ebfeabb2078b..512bd9e69a88c 100644
--- a/test/std/re/re.results/re.results.acc/str.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/str.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.acc/suffix.pass.cpp b/test/std/re/re.results/re.results.acc/suffix.pass.cpp
index b842ea861e437..a78bb67b4f0da 100644
--- a/test/std/re/re.results/re.results.acc/suffix.pass.cpp
+++ b/test/std/re/re.results/re.results.acc/suffix.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.all/get_allocator.pass.cpp b/test/std/re/re.results/re.results.all/get_allocator.pass.cpp
index 04367953ad29d..c4fe96d4a8a95 100644
--- a/test/std/re/re.results/re.results.all/get_allocator.pass.cpp
+++ b/test/std/re/re.results/re.results.all/get_allocator.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_allocator.h"
template <class CharT, class Allocator>
diff --git a/test/std/re/re.results/re.results.const/allocator.pass.cpp b/test/std/re/re.results/re.results.const/allocator.pass.cpp
index a24c669f657de..73347d08c6945 100644
--- a/test/std/re/re.results/re.results.const/allocator.pass.cpp
+++ b/test/std/re/re.results/re.results.const/allocator.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_allocator.h"
template <class CharT, class Allocator>
diff --git a/test/std/re/re.results/re.results.const/default.pass.cpp b/test/std/re/re.results/re.results.const/default.pass.cpp
index e10fbfd76cf0c..2fa85533a0ae0 100644
--- a/test/std/re/re.results/re.results.const/default.pass.cpp
+++ b/test/std/re/re.results/re.results.const/default.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.results/re.results.form/form1.pass.cpp b/test/std/re/re.results/re.results.form/form1.pass.cpp
index 5b04c684fef1a..55b5ade790a5d 100644
--- a/test/std/re/re.results/re.results.form/form1.pass.cpp
+++ b/test/std/re/re.results/re.results.form/form1.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
int main()
diff --git a/test/std/re/re.results/re.results.form/form2.pass.cpp b/test/std/re/re.results/re.results.form/form2.pass.cpp
index b18b7fb9f555b..ab7a525f48934 100644
--- a/test/std/re/re.results/re.results.form/form2.pass.cpp
+++ b/test/std/re/re.results/re.results.form/form2.pass.cpp
@@ -21,6 +21,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
#include "test_allocator.h"
diff --git a/test/std/re/re.results/re.results.form/form3.pass.cpp b/test/std/re/re.results/re.results.form/form3.pass.cpp
index 27f2388adce0f..e4c2e3d202836 100644
--- a/test/std/re/re.results/re.results.form/form3.pass.cpp
+++ b/test/std/re/re.results/re.results.form/form3.pass.cpp
@@ -21,6 +21,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_allocator.h"
int main()
diff --git a/test/std/re/re.results/re.results.form/form4.pass.cpp b/test/std/re/re.results/re.results.form/form4.pass.cpp
index 1d44c32f6a8bb..2c8aa9b8f9b50 100644
--- a/test/std/re/re.results/re.results.form/form4.pass.cpp
+++ b/test/std/re/re.results/re.results.form/form4.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.results/re.results.nonmember/equal.pass.cpp b/test/std/re/re.results/re.results.nonmember/equal.pass.cpp
index 7902b8e642e49..0a32f2e258a9d 100644
--- a/test/std/re/re.results/re.results.nonmember/equal.pass.cpp
+++ b/test/std/re/re.results/re.results.nonmember/equal.pass.cpp
@@ -23,6 +23,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.size/empty.pass.cpp b/test/std/re/re.results/re.results.size/empty.pass.cpp
index 6634d92830dc7..f03f5f752b3dc 100644
--- a/test/std/re/re.results/re.results.size/empty.pass.cpp
+++ b/test/std/re/re.results/re.results.size/empty.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.results/re.results.size/max_size.pass.cpp b/test/std/re/re.results/re.results.size/max_size.pass.cpp
index 0b31409275bf5..1ba29b926d5e8 100644
--- a/test/std/re/re.results/re.results.size/max_size.pass.cpp
+++ b/test/std/re/re.results/re.results.size/max_size.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.results/re.results.state/ready.pass.cpp b/test/std/re/re.results/re.results.state/ready.pass.cpp
index 8f586c3f32d65..1348016bbd915 100644
--- a/test/std/re/re.results/re.results.state/ready.pass.cpp
+++ b/test/std/re/re.results/re.results.state/ready.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test1()
diff --git a/test/std/re/re.results/re.results.swap/member_swap.pass.cpp b/test/std/re/re.results/re.results.swap/member_swap.pass.cpp
index 09b85c0ff5d20..cd1d72a2d4d18 100644
--- a/test/std/re/re.results/re.results.swap/member_swap.pass.cpp
+++ b/test/std/re/re.results/re.results.swap/member_swap.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp b/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp
index 3f5e34df44c5b..81e6c819e54cc 100644
--- a/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp
+++ b/test/std/re/re.results/re.results.swap/non_member_swap.pass.cpp
@@ -17,6 +17,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
void
test()
diff --git a/test/std/re/re.results/types.pass.cpp b/test/std/re/re.results/types.pass.cpp
index 4d553837efe8b..0b76875feaeee 100644
--- a/test/std/re/re.results/types.pass.cpp
+++ b/test/std/re/re.results/types.pass.cpp
@@ -27,6 +27,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp b/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp
index c14d5bcdefae7..be05afd4cf880 100644
--- a/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp b/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp
index 0874742f1c9ab..4b74f65d78261 100644
--- a/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.members/compare_sub_match.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp b/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp
index 48c05ca91d05a..097a3918ed131 100644
--- a/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.submatch/re.submatch.members/default.pass.cpp b/test/std/re/re.submatch/re.submatch.members/default.pass.cpp
index 451466af83cd8..1805f7eb3001f 100644
--- a/test/std/re/re.submatch/re.submatch.members/default.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.members/default.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.submatch/re.submatch.members/length.pass.cpp b/test/std/re/re.submatch/re.submatch.members/length.pass.cpp
index 4874c0d059218..20095483d80b1 100644
--- a/test/std/re/re.submatch/re.submatch.members/length.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.members/length.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp b/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp
index dd856a56d0b06..4c2877cd4db03 100644
--- a/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.members/operator_string.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.submatch/re.submatch.members/str.pass.cpp b/test/std/re/re.submatch/re.submatch.members/str.pass.cpp
index ca5fd7d78ac76..9a821890178c8 100644
--- a/test/std/re/re.submatch/re.submatch.members/str.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.members/str.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp b/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp
index 36376aa0563c3..8000ab6b75ce0 100644
--- a/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.op/compare.pass.cpp
@@ -215,6 +215,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
@@ -282,6 +283,6 @@ int main()
test(std::string("1234"), std::string("123"));
test(std::wstring(L"123"), std::wstring(L"123"));
test(std::wstring(L"1234"), std::wstring(L"123"));
- test(std::string("123\00056", 6), std::string("123\00056", 6), false);
- test(std::wstring(L"123\00056", 6), std::wstring(L"123\00056", 6), false);
+ test(std::string("123\000" "56", 6), std::string("123\000" "56", 6), false);
+ test(std::wstring(L"123\000" L"56", 6), std::wstring(L"123\000" L"56", 6), false);
}
diff --git a/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp b/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp
index 050bb062e7108..9f8c9869e12ee 100644
--- a/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp
+++ b/test/std/re/re.submatch/re.submatch.op/stream.pass.cpp
@@ -18,6 +18,7 @@
#include <regex>
#include <sstream>
#include <cassert>
+#include "test_macros.h"
template <class CharT>
void
diff --git a/test/std/re/re.submatch/types.pass.cpp b/test/std/re/re.submatch/types.pass.cpp
index 47c79149a8d3b..e5a00ca0416c7 100644
--- a/test/std/re/re.submatch/types.pass.cpp
+++ b/test/std/re/re.submatch/types.pass.cpp
@@ -26,6 +26,7 @@
#include <regex>
#include <type_traits>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/cmatch.pass.cpp b/test/std/re/re.syn/cmatch.pass.cpp
index 1364b7873ea51..bf467bcbc7724 100644
--- a/test/std/re/re.syn/cmatch.pass.cpp
+++ b/test/std/re/re.syn/cmatch.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/cregex_iterator.pass.cpp b/test/std/re/re.syn/cregex_iterator.pass.cpp
index 7b6ac133f5ace..ed5839da0ee52 100644
--- a/test/std/re/re.syn/cregex_iterator.pass.cpp
+++ b/test/std/re/re.syn/cregex_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/cregex_token_iterator.pass.cpp b/test/std/re/re.syn/cregex_token_iterator.pass.cpp
index 36ee9b66ea9d1..85dca0cf26020 100644
--- a/test/std/re/re.syn/cregex_token_iterator.pass.cpp
+++ b/test/std/re/re.syn/cregex_token_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/csub_match.pass.cpp b/test/std/re/re.syn/csub_match.pass.cpp
index e0de67b4feb75..2a87d8b6ef5c8 100644
--- a/test/std/re/re.syn/csub_match.pass.cpp
+++ b/test/std/re/re.syn/csub_match.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/regex.pass.cpp b/test/std/re/re.syn/regex.pass.cpp
index a208442b966c0..32fcb82f1a9c6 100644
--- a/test/std/re/re.syn/regex.pass.cpp
+++ b/test/std/re/re.syn/regex.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/smatch.pass.cpp b/test/std/re/re.syn/smatch.pass.cpp
index 87323538968e1..e2fc061133af8 100644
--- a/test/std/re/re.syn/smatch.pass.cpp
+++ b/test/std/re/re.syn/smatch.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/sregex_iterator.pass.cpp b/test/std/re/re.syn/sregex_iterator.pass.cpp
index 7acd96194b0e7..146316408ba6b 100644
--- a/test/std/re/re.syn/sregex_iterator.pass.cpp
+++ b/test/std/re/re.syn/sregex_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/sregex_token_iterator.pass.cpp b/test/std/re/re.syn/sregex_token_iterator.pass.cpp
index 185fd627b4fb5..aa85680c5a3bd 100644
--- a/test/std/re/re.syn/sregex_token_iterator.pass.cpp
+++ b/test/std/re/re.syn/sregex_token_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/ssub_match.pass.cpp b/test/std/re/re.syn/ssub_match.pass.cpp
index b378339664c00..181b7a307b587 100644
--- a/test/std/re/re.syn/ssub_match.pass.cpp
+++ b/test/std/re/re.syn/ssub_match.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wcmatch.pass.cpp b/test/std/re/re.syn/wcmatch.pass.cpp
index 3ca8ed51eabc1..0eb125602305b 100644
--- a/test/std/re/re.syn/wcmatch.pass.cpp
+++ b/test/std/re/re.syn/wcmatch.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wcregex_iterator.pass.cpp b/test/std/re/re.syn/wcregex_iterator.pass.cpp
index 99469ecf82b06..20c0d0d546e89 100644
--- a/test/std/re/re.syn/wcregex_iterator.pass.cpp
+++ b/test/std/re/re.syn/wcregex_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wcregex_token_iterator.pass.cpp b/test/std/re/re.syn/wcregex_token_iterator.pass.cpp
index f16911f2985a7..01a7f3c746a9e 100644
--- a/test/std/re/re.syn/wcregex_token_iterator.pass.cpp
+++ b/test/std/re/re.syn/wcregex_token_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wcsub_match.pass.cpp b/test/std/re/re.syn/wcsub_match.pass.cpp
index 7e8c872b6033a..f757d3f7c5ccf 100644
--- a/test/std/re/re.syn/wcsub_match.pass.cpp
+++ b/test/std/re/re.syn/wcsub_match.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wregex.pass.cpp b/test/std/re/re.syn/wregex.pass.cpp
index 635eac0176cc6..23be43baa9145 100644
--- a/test/std/re/re.syn/wregex.pass.cpp
+++ b/test/std/re/re.syn/wregex.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wsmatch.pass.cpp b/test/std/re/re.syn/wsmatch.pass.cpp
index 092c7d16d7a72..1483808bd8322 100644
--- a/test/std/re/re.syn/wsmatch.pass.cpp
+++ b/test/std/re/re.syn/wsmatch.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wsregex_iterator.pass.cpp b/test/std/re/re.syn/wsregex_iterator.pass.cpp
index 0052716e46d8a..436e6d717f8a0 100644
--- a/test/std/re/re.syn/wsregex_iterator.pass.cpp
+++ b/test/std/re/re.syn/wsregex_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wsregex_token_iterator.pass.cpp b/test/std/re/re.syn/wsregex_token_iterator.pass.cpp
index dc71991eb9b10..5ceb241f3dc15 100644
--- a/test/std/re/re.syn/wsregex_token_iterator.pass.cpp
+++ b/test/std/re/re.syn/wsregex_token_iterator.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.syn/wssub_match.pass.cpp b/test/std/re/re.syn/wssub_match.pass.cpp
index 2360a15513db5..23b92bb2d4ee8 100644
--- a/test/std/re/re.syn/wssub_match.pass.cpp
+++ b/test/std/re/re.syn/wssub_match.pass.cpp
@@ -13,6 +13,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.traits/default.pass.cpp b/test/std/re/re.traits/default.pass.cpp
index defadd95378ba..b1e23587d21f7 100644
--- a/test/std/re/re.traits/default.pass.cpp
+++ b/test/std/re/re.traits/default.pass.cpp
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "platform_support.h" // locale name macros
int main()
diff --git a/test/std/re/re.traits/getloc.pass.cpp b/test/std/re/re.traits/getloc.pass.cpp
index 0b7810a2099d5..929659d004b0e 100644
--- a/test/std/re/re.traits/getloc.pass.cpp
+++ b/test/std/re/re.traits/getloc.pass.cpp
@@ -18,6 +18,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "platform_support.h" // locale name macros
int main()
diff --git a/test/std/re/re.traits/imbue.pass.cpp b/test/std/re/re.traits/imbue.pass.cpp
index 6988058a832c7..04b4f5f7692b5 100644
--- a/test/std/re/re.traits/imbue.pass.cpp
+++ b/test/std/re/re.traits/imbue.pass.cpp
@@ -19,6 +19,7 @@
#include <locale>
#include <cassert>
+#include "test_macros.h"
#include "platform_support.h" // locale name macros
int main()
diff --git a/test/std/re/re.traits/isctype.pass.cpp b/test/std/re/re.traits/isctype.pass.cpp
index ad69f05ae75e5..3d1e7470a8837 100644
--- a/test/std/re/re.traits/isctype.pass.cpp
+++ b/test/std/re/re.traits/isctype.pass.cpp
@@ -13,8 +13,13 @@
// bool isctype(charT c, char_class_type f) const;
+// TODO(EricWF): This test takes 40+ minutes to build with Clang 3.8 under ASAN or MSAN.
+// UNSUPPORTED: asan, msan
+
+
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.traits/length.pass.cpp b/test/std/re/re.traits/length.pass.cpp
index 473c233c531e7..b80f9b5b400ae 100644
--- a/test/std/re/re.traits/length.pass.cpp
+++ b/test/std/re/re.traits/length.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.traits/lookup_classname.pass.cpp b/test/std/re/re.traits/lookup_classname.pass.cpp
index 0b1b18eb50774..4f7cf61ebf99c 100644
--- a/test/std/re/re.traits/lookup_classname.pass.cpp
+++ b/test/std/re/re.traits/lookup_classname.pass.cpp
@@ -18,6 +18,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
template <class char_type>
@@ -33,6 +34,19 @@ test(const char_type* A,
int main()
{
+// if __regex_word is not distinct from all the classes, bad things happen
+// See https://llvm.org/bugs/show_bug.cgi?id=26476 for an example.
+ assert((std::ctype_base::space & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::print & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::cntrl & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::upper & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::lower & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::alpha & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::digit & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::punct & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::xdigit & std::regex_traits<char>::__regex_word) == 0);
+ assert((std::ctype_base::blank & std::regex_traits<char>::__regex_word) == 0);
+
test("d", std::ctype_base::digit);
test("D", std::ctype_base::digit);
test("d", std::ctype_base::digit, true);
diff --git a/test/std/re/re.traits/lookup_collatename.pass.cpp b/test/std/re/re.traits/lookup_collatename.pass.cpp
index a7cd5f0715612..3aeed7bddf755 100644
--- a/test/std/re/re.traits/lookup_collatename.pass.cpp
+++ b/test/std/re/re.traits/lookup_collatename.pass.cpp
@@ -23,8 +23,9 @@
#include <regex>
#include <iterator>
#include <cassert>
-#include "test_iterators.h"
+#include "test_macros.h"
+#include "test_iterators.h"
#include "platform_support.h" // locale name macros
template <class char_type>
diff --git a/test/std/re/re.traits/transform.pass.cpp b/test/std/re/re.traits/transform.pass.cpp
index 85235e045d883..57e6b753abefa 100644
--- a/test/std/re/re.traits/transform.pass.cpp
+++ b/test/std/re/re.traits/transform.pass.cpp
@@ -19,8 +19,8 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
-
#include "platform_support.h" // locale name macros
int main()
diff --git a/test/std/re/re.traits/transform_primary.pass.cpp b/test/std/re/re.traits/transform_primary.pass.cpp
index 438cd75452bbb..03b4f3985a609 100644
--- a/test/std/re/re.traits/transform_primary.pass.cpp
+++ b/test/std/re/re.traits/transform_primary.pass.cpp
@@ -20,8 +20,9 @@
#include <regex>
#include <cassert>
-#include "test_iterators.h"
+#include "test_macros.h"
+#include "test_iterators.h"
#include "platform_support.h" // locale name macros
int main()
diff --git a/test/std/re/re.traits/translate.pass.cpp b/test/std/re/re.traits/translate.pass.cpp
index c3523387c56ba..7eaf30ea71c32 100644
--- a/test/std/re/re.traits/translate.pass.cpp
+++ b/test/std/re/re.traits/translate.pass.cpp
@@ -16,6 +16,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.traits/translate_nocase.pass.cpp b/test/std/re/re.traits/translate_nocase.pass.cpp
index f9fa38ddf26a6..bf79629d33b4d 100644
--- a/test/std/re/re.traits/translate_nocase.pass.cpp
+++ b/test/std/re/re.traits/translate_nocase.pass.cpp
@@ -25,6 +25,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "platform_support.h"
int main()
diff --git a/test/std/re/re.traits/types.pass.cpp b/test/std/re/re.traits/types.pass.cpp
index 50586a1f29f37..611ef04342fec 100644
--- a/test/std/re/re.traits/types.pass.cpp
+++ b/test/std/re/re.traits/types.pass.cpp
@@ -20,6 +20,7 @@
#include <regex>
#include <type_traits>
+#include "test_macros.h"
int main()
{
diff --git a/test/std/re/re.traits/value.pass.cpp b/test/std/re/re.traits/value.pass.cpp
index 349a29cc6bc15..dfed66c35c46b 100644
--- a/test/std/re/re.traits/value.pass.cpp
+++ b/test/std/re/re.traits/value.pass.cpp
@@ -15,6 +15,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
int main()
{