[libcxx-commits] [PATCH] D126849: [libc++][test] Enable some more string_view tests

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 1 20:27:21 PDT 2022


jloser created this revision.
jloser added reviewers: philnik, var-const, ldionne, Mordante.
Herald added a project: All.
jloser requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Some test cases for `ends_with.ptr.pass` and `starts_with.ptr.pass` for
`string_view` are commented out, but work just fine. Uncomment them.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126849

Files:
  libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
  libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp


Index: libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
===================================================================
--- libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
+++ libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
@@ -26,9 +26,9 @@
     SV  sv0 {};
     SV  sv1 { s, 1 };
     SV  sv2 { s, 2 };
-//     SV  sv3 { s, 3 };
-//     SV  sv4 { s, 4 };
-//     SV  sv5 { s, 5 };
+    SV  sv3 { s, 3 };
+    SV  sv4 { s, 4 };
+    SV  sv5 { s, 5 };
     SV  svNot {"def", 3 };
 
     LIBCPP_ASSERT_NOEXCEPT(sv0.starts_with(""));
Index: libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
===================================================================
--- libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
+++ libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
@@ -26,9 +26,9 @@
     SV  sv0 {};
     SV  sv1 { s + 4, 1 };
     SV  sv2 { s + 3, 2 };
-//     SV  sv3 { s + 2, 3 };
-//     SV  sv4 { s + 1, 4 };
-//     SV  sv5 { s    , 5 };
+    SV  sv3 { s + 2, 3 };
+    SV  sv4 { s + 1, 4 };
+    SV  sv5 { s    , 5 };
     SV  svNot {"def", 3 };
 
     LIBCPP_ASSERT_NOEXCEPT(sv0.ends_with(""));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126849.433633.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220602/849d485d/attachment.bin>


More information about the libcxx-commits mailing list