[libcxx-commits] [libcxx] a8cf78c - [libc++][NFC] Move span tests under views.span

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 6 11:06:17 PDT 2022


Author: Louis Dionne
Date: 2022-06-06T14:06:05-04:00
New Revision: a8cf78c73914f614d4ec339f7bd5bba8b20c3c29

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

LOG: [libc++][NFC] Move span tests under views.span

Added: 
    libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp
    libcxx/test/std/containers/views/views.span/enable_borrowed_range.compile.pass.cpp
    libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp
    libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/assign.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/deduct.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/default.fail.cpp
    libcxx/test/std/containers/views/views.span/span.cons/default.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/iterator_len.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp
    libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp
    libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/span.dtor.compile.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/span.fail.cpp
    libcxx/test/std/containers/views/views.span/span.cons/span.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp
    libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp
    libcxx/test/std/containers/views/views.span/span.elem/data.pass.cpp
    libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp
    libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp
    libcxx/test/std/containers/views/views.span/span.iterators/begin.pass.cpp
    libcxx/test/std/containers/views/views.span/span.iterators/end.pass.cpp
    libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/views/views.span/span.iterators/rbegin.pass.cpp
    libcxx/test/std/containers/views/views.span/span.iterators/rend.pass.cpp
    libcxx/test/std/containers/views/views.span/span.objectrep/as_bytes.pass.cpp
    libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.pass.cpp
    libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp
    libcxx/test/std/containers/views/views.span/span.obs/empty.nodiscard.verify.cpp
    libcxx/test/std/containers/views/views.span/span.obs/empty.pass.cpp
    libcxx/test/std/containers/views/views.span/span.obs/size.pass.cpp
    libcxx/test/std/containers/views/views.span/span.obs/size_bytes.pass.cpp
    libcxx/test/std/containers/views/views.span/span.sub/first.fail.cpp
    libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
    libcxx/test/std/containers/views/views.span/span.sub/last.fail.cpp
    libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
    libcxx/test/std/containers/views/views.span/span.sub/subspan.fail.cpp
    libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
    libcxx/test/std/containers/views/views.span/trivially_copyable.compile.pass.cpp
    libcxx/test/std/containers/views/views.span/types.pass.cpp

Modified: 
    

Removed: 
    libcxx/test/libcxx/containers/views/span.cons/range.pass.cpp
    libcxx/test/libcxx/containers/views/span.cons/range.verify.cpp
    libcxx/test/std/containers/views/enable_borrowed_range.compile.pass.cpp
    libcxx/test/std/containers/views/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/views/span.cons/array.fail.cpp
    libcxx/test/std/containers/views/span.cons/array.pass.cpp
    libcxx/test/std/containers/views/span.cons/assign.pass.cpp
    libcxx/test/std/containers/views/span.cons/copy.pass.cpp
    libcxx/test/std/containers/views/span.cons/deduct.pass.cpp
    libcxx/test/std/containers/views/span.cons/default.fail.cpp
    libcxx/test/std/containers/views/span.cons/default.pass.cpp
    libcxx/test/std/containers/views/span.cons/initializer_list.pass.cpp
    libcxx/test/std/containers/views/span.cons/iterator_len.pass.cpp
    libcxx/test/std/containers/views/span.cons/iterator_len.verify.cpp
    libcxx/test/std/containers/views/span.cons/iterator_sentinel.pass.cpp
    libcxx/test/std/containers/views/span.cons/iterator_sentinel.verify.cpp
    libcxx/test/std/containers/views/span.cons/range.pass.cpp
    libcxx/test/std/containers/views/span.cons/span.dtor.compile.pass.cpp
    libcxx/test/std/containers/views/span.cons/span.fail.cpp
    libcxx/test/std/containers/views/span.cons/span.pass.cpp
    libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp
    libcxx/test/std/containers/views/span.elem/back.pass.cpp
    libcxx/test/std/containers/views/span.elem/data.pass.cpp
    libcxx/test/std/containers/views/span.elem/front.pass.cpp
    libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp
    libcxx/test/std/containers/views/span.iterators/begin.pass.cpp
    libcxx/test/std/containers/views/span.iterators/end.pass.cpp
    libcxx/test/std/containers/views/span.iterators/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/views/span.iterators/rbegin.pass.cpp
    libcxx/test/std/containers/views/span.iterators/rend.pass.cpp
    libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp
    libcxx/test/std/containers/views/span.objectrep/as_writable_bytes.fail.cpp
    libcxx/test/std/containers/views/span.objectrep/as_writable_bytes.pass.cpp
    libcxx/test/std/containers/views/span.obs/empty.nodiscard.verify.cpp
    libcxx/test/std/containers/views/span.obs/empty.pass.cpp
    libcxx/test/std/containers/views/span.obs/size.pass.cpp
    libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp
    libcxx/test/std/containers/views/span.sub/first.fail.cpp
    libcxx/test/std/containers/views/span.sub/first.pass.cpp
    libcxx/test/std/containers/views/span.sub/last.fail.cpp
    libcxx/test/std/containers/views/span.sub/last.pass.cpp
    libcxx/test/std/containers/views/span.sub/subspan.fail.cpp
    libcxx/test/std/containers/views/span.sub/subspan.pass.cpp
    libcxx/test/std/containers/views/trivially_copyable.compile.pass.cpp
    libcxx/test/std/containers/views/types.pass.cpp


################################################################################
diff  --git a/libcxx/test/libcxx/containers/views/span.cons/range.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/containers/views/span.cons/range.pass.cpp
rename to libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp

diff  --git a/libcxx/test/libcxx/containers/views/span.cons/range.verify.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/containers/views/span.cons/range.verify.cpp
rename to libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp

diff  --git a/libcxx/test/std/containers/views/span.objectrep/as_writable_bytes.fail.cpp b/libcxx/test/std/containers/views/span.objectrep/as_writable_bytes.fail.cpp
deleted file mode 100644
index e7c4d356d6c6e..0000000000000
--- a/libcxx/test/std/containers/views/span.objectrep/as_writable_bytes.fail.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03, c++11, c++14, c++17
-
-// <span>
-
-// template <class ElementType, size_t Extent>
-//     span<byte,
-//          Extent == dynamic_extent
-//              ? dynamic_extent
-//              : sizeof(ElementType) * Extent>
-//     as_writable_bytes(span<ElementType, Extent> s) noexcept;
-
-
-#include <span>
-#include <cassert>
-#include <string>
-
-#include "test_macros.h"
-
-const int iArr2[] = { 0,  1,  2,  3,  4,  5,  6,  7,  8,  9};
-
-struct A {};
-
-int main(int, char**)
-{
-    std::as_writable_bytes(std::span<const int>());            // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const long>());           // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const double>());         // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const A>());              // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const std::string>());    // expected-error {{no matching function for call to 'as_writable_bytes'}}
-
-    std::as_writable_bytes(std::span<const int, 0>());         // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const long, 0>());        // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const double, 0>());      // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const A, 0>());           // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const std::string, (size_t)0>()); // expected-error {{no matching function for call to 'as_writable_bytes'}}
-
-    std::as_writable_bytes(std::span<const int>   (iArr2, 1));     // expected-error {{no matching function for call to 'as_writable_bytes'}}
-    std::as_writable_bytes(std::span<const int, 1>(iArr2 + 5, 1)); // expected-error {{no matching function for call to 'as_writable_bytes'}}
-
-  return 0;
-}

diff  --git a/libcxx/test/std/containers/views/enable_borrowed_range.compile.pass.cpp b/libcxx/test/std/containers/views/views.span/enable_borrowed_range.compile.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/enable_borrowed_range.compile.pass.cpp
rename to libcxx/test/std/containers/views/views.span/enable_borrowed_range.compile.pass.cpp

diff  --git a/libcxx/test/std/containers/views/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/range_concept_conformance.compile.pass.cpp
rename to libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/array.fail.cpp b/libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/array.fail.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/array.fail.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/array.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/array.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/assign.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/assign.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/assign.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/assign.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/copy.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/copy.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/copy.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/deduct.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/deduct.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/deduct.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/deduct.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/default.fail.cpp b/libcxx/test/std/containers/views/views.span/span.cons/default.fail.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/default.fail.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/default.fail.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/default.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/default.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/default.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/default.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/initializer_list.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/initializer_list.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/iterator_len.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/iterator_len.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/iterator_len.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/iterator_len.verify.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/iterator_len.verify.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/iterator_sentinel.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/iterator_sentinel.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/iterator_sentinel.verify.cpp b/libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/iterator_sentinel.verify.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/range.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/range.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/span.dtor.compile.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/span.dtor.compile.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/span.dtor.compile.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/span.dtor.compile.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/span.fail.cpp b/libcxx/test/std/containers/views/views.span/span.cons/span.fail.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/span.fail.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/span.fail.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/span.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/span.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/span.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/span.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.cons/stdarray.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.elem/back.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.elem/back.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.elem/data.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/data.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.elem/data.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.elem/data.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.elem/front.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.elem/front.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.elem/op_idx.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.iterators/begin.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/begin.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.iterators/begin.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.iterators/begin.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.iterators/end.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/end.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.iterators/end.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.iterators/end.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.iterators/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.iterators/iterator_concept_conformance.compile.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.iterators/rbegin.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/rbegin.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.iterators/rbegin.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.iterators/rbegin.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.iterators/rend.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/rend.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.iterators/rend.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.iterators/rend.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp b/libcxx/test/std/containers/views/views.span/span.objectrep/as_bytes.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.objectrep/as_bytes.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.objectrep/as_bytes.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.objectrep/as_writable_bytes.pass.cpp b/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.objectrep/as_writable_bytes.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.pass.cpp

diff  --git a/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp b/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp
new file mode 100644
index 0000000000000..d32d5912c7843
--- /dev/null
+++ b/libcxx/test/std/containers/views/views.span/span.objectrep/as_writable_bytes.verify.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+
+// <span>
+
+// template <class ElementType, size_t Extent>
+//     span<byte,
+//          Extent == dynamic_extent
+//              ? dynamic_extent
+//              : sizeof(ElementType) * Extent>
+//     as_writable_bytes(span<ElementType, Extent> s) noexcept;
+
+#include <span>
+#include <string>
+
+#include "test_macros.h"
+
+const int iArr2[] = { 0,  1,  2,  3,  4,  5,  6,  7,  8,  9};
+
+struct A {};
+
+void f() {
+  std::as_writable_bytes(std::span<const int>());            // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const long>());           // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const double>());         // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const A>());              // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const std::string>());    // expected-error {{no matching function for call to 'as_writable_bytes'}}
+
+  std::as_writable_bytes(std::span<const int, 0>());         // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const long, 0>());        // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const double, 0>());      // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const A, 0>());           // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const std::string, (size_t)0>()); // expected-error {{no matching function for call to 'as_writable_bytes'}}
+
+  std::as_writable_bytes(std::span<const int>   (iArr2, 1));     // expected-error {{no matching function for call to 'as_writable_bytes'}}
+  std::as_writable_bytes(std::span<const int, 1>(iArr2 + 5, 1)); // expected-error {{no matching function for call to 'as_writable_bytes'}}
+}

diff  --git a/libcxx/test/std/containers/views/span.obs/empty.nodiscard.verify.cpp b/libcxx/test/std/containers/views/views.span/span.obs/empty.nodiscard.verify.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.obs/empty.nodiscard.verify.cpp
rename to libcxx/test/std/containers/views/views.span/span.obs/empty.nodiscard.verify.cpp

diff  --git a/libcxx/test/std/containers/views/span.obs/empty.pass.cpp b/libcxx/test/std/containers/views/views.span/span.obs/empty.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.obs/empty.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.obs/empty.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.obs/size.pass.cpp b/libcxx/test/std/containers/views/views.span/span.obs/size.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.obs/size.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.obs/size.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp b/libcxx/test/std/containers/views/views.span/span.obs/size_bytes.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.obs/size_bytes.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.obs/size_bytes.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.sub/first.fail.cpp b/libcxx/test/std/containers/views/views.span/span.sub/first.fail.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.sub/first.fail.cpp
rename to libcxx/test/std/containers/views/views.span/span.sub/first.fail.cpp

diff  --git a/libcxx/test/std/containers/views/span.sub/first.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.sub/first.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.sub/last.fail.cpp b/libcxx/test/std/containers/views/views.span/span.sub/last.fail.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.sub/last.fail.cpp
rename to libcxx/test/std/containers/views/views.span/span.sub/last.fail.cpp

diff  --git a/libcxx/test/std/containers/views/span.sub/last.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.sub/last.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp

diff  --git a/libcxx/test/std/containers/views/span.sub/subspan.fail.cpp b/libcxx/test/std/containers/views/views.span/span.sub/subspan.fail.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.sub/subspan.fail.cpp
rename to libcxx/test/std/containers/views/views.span/span.sub/subspan.fail.cpp

diff  --git a/libcxx/test/std/containers/views/span.sub/subspan.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/span.sub/subspan.pass.cpp
rename to libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp

diff  --git a/libcxx/test/std/containers/views/trivially_copyable.compile.pass.cpp b/libcxx/test/std/containers/views/views.span/trivially_copyable.compile.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/trivially_copyable.compile.pass.cpp
rename to libcxx/test/std/containers/views/views.span/trivially_copyable.compile.pass.cpp

diff  --git a/libcxx/test/std/containers/views/types.pass.cpp b/libcxx/test/std/containers/views/views.span/types.pass.cpp
similarity index 100%
rename from libcxx/test/std/containers/views/types.pass.cpp
rename to libcxx/test/std/containers/views/views.span/types.pass.cpp


        


More information about the libcxx-commits mailing list