summaryrefslogtreecommitdiff
path: root/test/std/re
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
parent0dc0969cd0a732760f0aa79942a04e0eaef297c4 (diff)
Notes
Diffstat (limited to 'test/std/re')
-rw-r--r--test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp4
-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
4 files changed, 8 insertions, 10 deletions
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 6cffc0da9a525..849ec4ae51f6f 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
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <regex>
// class regex_token_iterator<BidirectionalIterator, charT, traits>
@@ -23,7 +25,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
std::regex phone_numbers("\\d{3}-(\\d{4})");
const char phone_book[] = "start 555-1234, 555-2345, 555-3456 end";
@@ -61,5 +62,4 @@ int main()
++i;
assert(i == std::cregex_token_iterator());
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
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
}