diff options
Diffstat (limited to 'test/std/thread/futures/futures.promise/move_ctor.pass.cpp')
-rw-r--r-- | test/std/thread/futures/futures.promise/move_ctor.pass.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/std/thread/futures/futures.promise/move_ctor.pass.cpp b/test/std/thread/futures/futures.promise/move_ctor.pass.cpp index 9a68b5c1b4e1..c9971b0a3f04 100644 --- a/test/std/thread/futures/futures.promise/move_ctor.pass.cpp +++ b/test/std/thread/futures/futures.promise/move_ctor.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() @@ -32,6 +32,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(); @@ -42,6 +43,7 @@ int main() assert(e.code() == make_error_code(std::future_errc::no_state)); } assert(test_alloc_base::alloc_count == 1); +#endif } assert(test_alloc_base::alloc_count == 0); { @@ -51,6 +53,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(); @@ -61,6 +64,7 @@ int main() assert(e.code() == make_error_code(std::future_errc::no_state)); } assert(test_alloc_base::alloc_count == 1); +#endif } assert(test_alloc_base::alloc_count == 0); { @@ -70,6 +74,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(); @@ -80,6 +85,7 @@ int main() assert(e.code() == make_error_code(std::future_errc::no_state)); } assert(test_alloc_base::alloc_count == 1); +#endif } assert(test_alloc_base::alloc_count == 0); } |