summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/thread/futures
diff options
context:
space:
mode:
authorRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2016-12-01 17:34:57 +0000
committerRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2016-12-01 17:34:57 +0000
commitf3fce920ff48eb643aa25cb71dc0b1013d86c672 (patch)
treef86bdf5373fa398567f040f680cfeef10045cdaf /libcxx/test/std/thread/futures
parent4ddb8c01b1b3c1cb24e87f992ad00826025ac1ba (diff)
downloadbcm5719-llvm-f3fce920ff48eb643aa25cb71dc0b1013d86c672.tar.gz
bcm5719-llvm-f3fce920ff48eb643aa25cb71dc0b1013d86c672.zip
Protect futures test under libcpp-no-exceptions
Skip tests that expect an exception be thrown. Differential Revision: https://reviews.llvm.org/D27253 llvm-svn: 288382
Diffstat (limited to 'libcxx/test/std/thread/futures')
-rw-r--r--libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp
index 9dd8a9daef8..ad72bf78e0a 100644
--- a/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.promise/move_assign.pass.cpp
@@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
//
-// XFAIL: libcpp-no-exceptions
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: c++98, c++03
@@ -20,6 +19,7 @@
#include <future>
#include <cassert>
+#include "test_macros.h"
#include "test_allocator.h"
int main()
@@ -34,6 +34,7 @@ int main()
std::future<int> f = p.get_future();
assert(test_alloc_base::alloc_count == 1);
assert(f.valid());
+#ifndef TEST_HAS_NO_EXCEPTIONS
try
{
f = p0.get_future();
@@ -43,6 +44,7 @@ int main()
{
assert(e.code() == make_error_code(std::future_errc::no_state));
}
+#endif
assert(test_alloc_base::alloc_count == 1);
}
assert(test_alloc_base::alloc_count == 0);
@@ -55,6 +57,7 @@ int main()
std::future<int&> f = p.get_future();
assert(test_alloc_base::alloc_count == 1);
assert(f.valid());
+#ifndef TEST_HAS_NO_EXCEPTIONS
try
{
f = p0.get_future();
@@ -64,6 +67,7 @@ int main()
{
assert(e.code() == make_error_code(std::future_errc::no_state));
}
+#endif
assert(test_alloc_base::alloc_count == 1);
}
assert(test_alloc_base::alloc_count == 0);
@@ -76,6 +80,7 @@ int main()
std::future<void> f = p.get_future();
assert(test_alloc_base::alloc_count == 1);
assert(f.valid());
+#ifndef TEST_HAS_NO_EXCEPTIONS
try
{
f = p0.get_future();
@@ -85,6 +90,7 @@ int main()
{
assert(e.code() == make_error_code(std::future_errc::no_state));
}
+#endif
assert(test_alloc_base::alloc_count == 1);
}
assert(test_alloc_base::alloc_count == 0);
OpenPOWER on IntegriCloud