[libcxx-commits] [libcxx] 6423a9f - [libc++][test] Enable some more string_view tests

Joe Loser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 2 07:57:13 PDT 2022


Author: Joe Loser
Date: 2022-06-02T08:56:02-06:00
New Revision: 6423a9f0ec8ba70049ea76e7bcfc9a9d1a54e826

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

LOG: [libc++][test] Enable some more string_view tests

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.

Differential Revision: https://reviews.llvm.org/D126849

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
index 83f2a4077558a..ada9dfa682785 100644
--- a/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
@@ -26,9 +26,9 @@ int main(int, char**)
     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(""));

diff  --git a/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
index ef64597530cc1..bde10118180da 100644
--- a/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
@@ -26,9 +26,9 @@ int main(int, char**)
     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(""));


        


More information about the libcxx-commits mailing list