[libcxx-commits] [libcxx] 7ea5409 - [libc++] Fix tests after aee49255074f

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 22 09:50:35 PDT 2021


Author: Louis Dionne
Date: 2021-10-22T12:50:29-04:00
New Revision: 7ea5409e42c8d8f901c8278568f40770abe3e25e

URL: https://github.com/llvm/llvm-project/commit/7ea5409e42c8d8f901c8278568f40770abe3e25e
DIFF: https://github.com/llvm/llvm-project/commit/7ea5409e42c8d8f901c8278568f40770abe3e25e.diff

LOG: [libc++] Fix tests after aee49255074f

Added: 
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.verify.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.verify.cpp

Modified: 
    libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp

Removed: 
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp


################################################################################
diff  --git a/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp b/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
index 7f32f50d55ea..14c5927112d5 100644
--- a/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
+++ b/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
@@ -51,7 +51,7 @@ void test() {
     LIBCPP_STATIC_ASSERT(!std::__default_initializable<const int>);
     static_assert(!std::default_initializable<const int>);
 
-    const int x3[1]; // expected-error {{default initialization of an object of const type 'const int[1]'}}
+    const int x3[1]; // expected-error-re {{default initialization of an object of const type 'const int{{[ ]*}}[1]'}}
     const int y3[1]{};
     static_assert(std::constructible_from<const int[1]>);
     static_assert(brace_initializable<const int[1]>);

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.verify.cpp
similarity index 67%
rename from libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp
rename to libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.verify.cpp
index c32a3ca15f4e..d125eb02f33f 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.verify.cpp
@@ -18,8 +18,8 @@
 int main(int, char**) {
   std::unique_ptr<int[]> p(new int(3));
   const std::unique_ptr<int[]>& cp = p;
-  TEST_IGNORE_NODISCARD (*p);  // expected-error {{indirection requires pointer operand ('std::unique_ptr<int[]>' invalid)}}
-  TEST_IGNORE_NODISCARD (*cp); // expected-error {{indirection requires pointer operand ('const std::unique_ptr<int[]>' invalid)}}
+  TEST_IGNORE_NODISCARD(*p);  // expected-error-re {{indirection requires pointer operand ('std::unique_ptr<int{{[ ]*}}[]>' invalid)}}
+  TEST_IGNORE_NODISCARD(*cp); // expected-error-re {{indirection requires pointer operand ('const std::unique_ptr<int{{[ ]*}}[]>' invalid)}}
 
   return 0;
 }

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.verify.cpp
similarity index 69%
rename from libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp
rename to libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.verify.cpp
index c79fca62fd38..3d1a5e066a7a 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.runtime.fail.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.verify.cpp
@@ -23,10 +23,10 @@ int main(int, char**) {
   std::unique_ptr<V[]> p;
   std::unique_ptr<V[]> const& cp = p;
 
-  p->member; // expected-error {{member reference type 'std::unique_ptr<V[]>' is not a pointer}}
-  // expected-error at -1 {{no member named 'member'}}
+  p->member; // expected-error-re {{member reference type 'std::unique_ptr<V{{[ ]*}}[]>' is not a pointer}}
+             // expected-error at -1 {{no member named 'member'}}
 
-  cp->member; // expected-error {{member reference type 'const std::unique_ptr<V[]>' is not a pointer}}
+  cp->member; // expected-error-re {{member reference type 'const std::unique_ptr<V{{[ ]*}}[]>' is not a pointer}}
               // expected-error at -1 {{no member named 'member'}}
 
   return 0;


        


More information about the libcxx-commits mailing list