diff options
Diffstat (limited to 'libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp')
| -rw-r--r-- | libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp b/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp index 6eea1d889b6..23d33138e3b 100644 --- a/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: libcpp-no-exceptions // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++98, c++03 @@ -22,6 +21,8 @@ #include <future> #include <cassert> +#include "test_macros.h" + void func1(std::promise<int> p) { std::this_thread::sleep_for(std::chrono::milliseconds(500)); @@ -73,6 +74,7 @@ int main() assert(f.get() == 3); assert(f.valid()); } +#ifndef TEST_HAS_NO_EXCEPTIONS { std::promise<T> p; std::shared_future<T> f = p.get_future(); @@ -89,6 +91,7 @@ int main() } assert(f.valid()); } +#endif } { typedef int& T; @@ -100,6 +103,7 @@ int main() assert(f.get() == 5); assert(f.valid()); } +#ifndef TEST_HAS_NO_EXCEPTIONS { std::promise<T> p; std::shared_future<T> f = p.get_future(); @@ -116,6 +120,7 @@ int main() } assert(f.valid()); } +#endif } { typedef void T; @@ -127,6 +132,7 @@ int main() f.get(); assert(f.valid()); } +#ifndef TEST_HAS_NO_EXCEPTIONS { std::promise<T> p; std::shared_future<T> f = p.get_future(); @@ -143,5 +149,6 @@ int main() } assert(f.valid()); } +#endif } } |

