[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
|
||||
// UNSUPPORTED: libcpp-has-no-threads
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
@@ -73,7 +72,7 @@ std::unique_ptr<int> f4(std::unique_ptr<int>&& p)
|
||||
void f5(int j)
|
||||
{
|
||||
std::this_thread::sleep_for(ms(200));
|
||||
throw j;
|
||||
TEST_THROW(j);
|
||||
}
|
||||
|
||||
template <class Ret, class CheckLamdba, class ...Args>
|
||||
@@ -140,6 +139,7 @@ int main()
|
||||
test<Ret>(checkUPtr, DPID, f3, 3);
|
||||
test<Ret>(checkUPtr, DPID, f4, std::unique_ptr<int>(new int(3)));
|
||||
}
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
{
|
||||
std::future<void> f = std::async(f5, 3);
|
||||
std::this_thread::sleep_for(ms(300));
|
||||
@@ -150,4 +150,5 @@ int main()
|
||||
std::this_thread::sleep_for(ms(300));
|
||||
try { f.get(); assert (false); } catch ( int ) {}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user