summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/test/thread/futures/futures.future_error/what.pass.cpp7
-rw-r--r--libcxx/test/thread/futures/futures.promise/dtor.pass.cpp10
2 files changed, 16 insertions, 1 deletions
diff --git a/libcxx/test/thread/futures/futures.future_error/what.pass.cpp b/libcxx/test/thread/futures/futures.future_error/what.pass.cpp
index 1c250a9f1c7..1dd77fad0cd 100644
--- a/libcxx/test/thread/futures/futures.future_error/what.pass.cpp
+++ b/libcxx/test/thread/futures/futures.future_error/what.pass.cpp
@@ -7,6 +7,13 @@
//
//===----------------------------------------------------------------------===//
+// LWG 2056 changed the values of future_errc, so if we're using new headers
+// with an old library we'll get incorrect messages.
+//
+// XFAIL: x86_64-apple-darwin11
+// XFAIL: x86_64-apple-darwin12
+// XFAIL: x86_64-apple-darwin13
+
// <future>
// class future_error
diff --git a/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp b/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp
index 340160577b5..cd4fafb8f63 100644
--- a/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp
+++ b/libcxx/test/thread/futures/futures.promise/dtor.pass.cpp
@@ -100,7 +100,15 @@ int main()
}
catch (const std::future_error& e)
{
- assert(e.code() == make_error_code(std::future_errc::broken_promise));
+ // LWG 2056 changed the values of future_errc, so if we're using new
+ // headers with an old library the error codes won't line up.
+ //
+ // Note that this particular check only applies to promise<void>
+ // since the other specializations happen to be implemented in the
+ // header rather than the library.
+ assert(
+ e.code() == make_error_code(std::future_errc::broken_promise) ||
+ e.code() == std::error_code(0, std::future_category()));
}
}
}
OpenPOWER on IntegriCloud