[libcxx-commits] [libcxx] r356678 - [libc++] Mark bad_any_cast tests as unsupported when the dylib doesn't support bad_any_cast
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 21 08:37:11 PDT 2019
Author: ldionne
Date: Thu Mar 21 08:37:11 2019
New Revision: 356678
URL: http://llvm.org/viewvc/llvm-project?rev=356678&view=rev
Log:
[libc++] Mark bad_any_cast tests as unsupported when the dylib doesn't support bad_any_cast
With the latest compiler fix to availability, some availability failures
that didn't trigger before now trigger.
Modified:
libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp
libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp
Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp?rev=356678&r1=356677&r2=356678&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp Thu Mar 21 08:37:11 2019
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: dylib-has-no-bad_any_cast
// <any>
@@ -21,10 +22,6 @@ struct TestType {};
using std::any;
using std::any_cast;
-// On platforms that do not support any_cast, an additional availability error
-// is triggered by these tests.
-// expected-error at any_cast_request_invalid_value_category.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}}
-
void test_const_lvalue_cast_request_non_const_lvalue()
{
const any a;
Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp?rev=356678&r1=356677&r2=356678&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp Thu Mar 21 08:37:11 2019
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: dylib-has-no-bad_any_cast
// <any>
@@ -20,10 +21,6 @@
struct TestType {};
struct TestType2 {};
-// On platforms that do not support any_cast, an additional availability error
-// is triggered by these tests.
-// expected-error at const_correctness.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}}
-
int main(int, char**)
{
using std::any;
Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp?rev=356678&r1=356677&r2=356678&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp Thu Mar 21 08:37:11 2019
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: dylib-has-no-bad_any_cast
// <any>
@@ -39,10 +40,6 @@ struct no_move {
no_move(no_move const&) {}
};
-// On platforms that do not support any_cast, an additional availability error
-// is triggered by these tests.
-// expected-error at not_copy_constructible.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}}
-
int main(int, char**) {
any a;
// expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
More information about the libcxx-commits
mailing list