summaryrefslogtreecommitdiffstats
path: root/test/std/thread/futures/futures.promise
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
commit5813abeff213509519806b29c09a58886016345f (patch)
tree351e20577094e44f5f6ce795444a860404920beb /test/std/thread/futures/futures.promise
parent486d8a9adc9176fc50626f4f7417b6fcb88e57c6 (diff)
downloadexternal_libcxx-5813abeff213509519806b29c09a58886016345f.tar.gz
external_libcxx-5813abeff213509519806b29c09a58886016345f.tar.bz2
external_libcxx-5813abeff213509519806b29c09a58886016345f.zip
Protect futures test under libcpp-no-exceptions
Skip tests that expect an exception be thrown. Differential Revision: https://reviews.llvm.org/D27253 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/thread/futures/futures.promise')
-rw-r--r--test/std/thread/futures/futures.promise/move_assign.pass.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/std/thread/futures/futures.promise/move_assign.pass.cpp b/test/std/thread/futures/futures.promise/move_assign.pass.cpp
index 9dd8a9dae..ad72bf78e 100644
--- a/test/std/thread/futures/futures.promise/move_assign.pass.cpp
+++ b/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);