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 9dd8a9daef80..ad72bf78e0a4 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 #include +#include "test_macros.h" #include "test_allocator.h" int main() @@ -34,6 +34,7 @@ int main() std::future 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 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 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);