summaryrefslogtreecommitdiff
path: root/test/std/re/re.regex
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-20 21:21:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-20 21:21:10 +0000
commit1c3313bd0215c89fb38710a1ea0762ccf32e859c (patch)
tree65e6d33ca6254b41a8f4230edff47c5344dbd019 /test/std/re/re.regex
parent0dc0969cd0a732760f0aa79942a04e0eaef297c4 (diff)
Notes
Diffstat (limited to 'test/std/re/re.regex')
-rw-r--r--test/std/re/re.regex/re.regex.assign/assign.il.pass.cpp4
-rw-r--r--test/std/re/re.regex/re.regex.assign/il.pass.cpp4
-rw-r--r--test/std/re/re.regex/re.regex.construct/il_flg.pass.cpp6
3 files changed, 6 insertions, 8 deletions
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 39c3a22ef7257..fcaee8c3d6862 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
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <regex>
// template <class charT, class traits = regex_traits<charT>> class basic_regex;
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
std::regex r2;
r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'});
assert(r2.flags() == std::regex::ECMAScript);
@@ -30,5 +31,4 @@ int main()
r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex::extended);
assert(r2.flags() == std::regex::extended);
assert(r2.mark_count() == 2);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
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 022170f2d1366..a74d9cf6ed114 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
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <regex>
// template <class charT, class traits = regex_traits<charT>> class basic_regex;
@@ -19,10 +21,8 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
std::regex r2;
r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'};
assert(r2.flags() == std::regex::ECMAScript);
assert(r2.mark_count() == 2);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
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 c1554d6c3ebb7..87dcc856940b8 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
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <regex>
// template <class charT, class traits = regex_traits<charT>> class basic_regex;
@@ -18,7 +20,6 @@
#include <cassert>
#include "test_macros.h"
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
void
test(std::initializer_list<char> il, std::regex_constants::syntax_option_type f, unsigned mc)
@@ -28,11 +29,9 @@ test(std::initializer_list<char> il, std::regex_constants::syntax_option_type f,
assert(r.mark_count() == mc);
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
std::string s1("\\(a\\)");
std::string s2("\\(a[bc]\\)");
std::string s3("\\(a\\([bc]\\)\\)");
@@ -67,5 +66,4 @@ int main()
test({'\\', '(', 'a', '[', 'b', 'c', ']', '\\', ')'}, std::regex_constants::egrep, 0);
test({'\\', '(', 'a', '\\', '(', '[', 'b', 'c', ']', '\\', ')', '\\', ')'}, std::regex_constants::egrep, 0);
test({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex_constants::egrep, 2);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}