mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 12:02:36 +08:00
[libcxx] Recover no-exceptions XFAILs - I
First batch of changes to get some of these XFAILs working in the no-exceptions libc++ variant. Changed some XFAILs to UNSUPPORTED where the test is all about exception handling. In other cases, used the test macros TEST_THROW and TEST_HAS_NO_EXCEPTIONS to conditionally exclude those parts of the test that concerns exception handling behaviour. Reviewers: EricWF, mclow.lists Differential revision: https://reviews.llvm.org/D24562 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283441 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// XFAIL: libcpp-no-exceptions
|
||||
// <regex>
|
||||
|
||||
// template <class charT, class traits = regex_traits<charT>> class basic_regex;
|
||||
@@ -27,6 +26,7 @@ int main()
|
||||
assert(r2.mark_count() == 2);
|
||||
assert(std::regex_search("ab", r2));
|
||||
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
bool caught = false;
|
||||
try { r2.assign("(def", std::regex::extended); }
|
||||
catch(std::regex_error &) { caught = true; }
|
||||
@@ -34,4 +34,5 @@ int main()
|
||||
assert(r2.flags() == std::regex::ECMAScript);
|
||||
assert(r2.mark_count() == 2);
|
||||
assert(std::regex_search("ab", r2));
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user