[libcxx-commits] [libcxx] 4be36dc - [libc++][test] Fix unused variable warning in string_view tests
Joe Loser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 2 12:34:07 PDT 2022
Author: Joe Loser
Date: 2022-06-02T13:33:37-06:00
New Revision: 4be36dc77fc96766988344b54f6ab5aade86e1c6
URL: https://github.com/llvm/llvm-project/commit/4be36dc77fc96766988344b54f6ab5aade86e1c6
DIFF: https://github.com/llvm/llvm-project/commit/4be36dc77fc96766988344b54f6ab5aade86e1c6.diff
LOG: [libc++][test] Fix unused variable warning in string_view tests
In 6423a9f0ec8ba70049ea76e7bcfc9a9d1a54e826, I accidentally thought this was
getting tested, but these variables are unused. Just remove the lines instead of
leaving them commented out.
Differential Revision: https://reviews.llvm.org/D126901
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 ada9dfa682785..0fea0ea6f5cb3 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,6 @@ 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 svNot {"def", 3 };
LIBCPP_ASSERT_NOEXCEPT(sv0.ends_with(""));
@@ -68,9 +65,6 @@ int main(int, char**)
constexpr SV sv0 {};
constexpr SV sv1 { s + 4, 1 };
constexpr SV sv2 { s + 3, 2 };
-// constexpr SV sv3 { s + 2, 3 };
-// constexpr SV sv4 { s + 1, 4 };
-// constexpr SV sv5 { s, 5 };
constexpr SV svNot {"def", 3 };
static_assert ( 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 bde10118180da..464606fda547a 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,6 @@ 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 svNot {"def", 3 };
LIBCPP_ASSERT_NOEXCEPT(sv0.starts_with(""));
@@ -68,9 +65,6 @@ int main(int, char**)
constexpr SV sv0 {};
constexpr SV sv1 { s, 1 };
constexpr SV sv2 { s, 2 };
-// constexpr SV sv3 { s, 3 };
-// constexpr SV sv4 { s, 4 };
-// constexpr SV sv5 { s, 5 };
constexpr SV svNot {"def", 3 };
static_assert ( sv0.starts_with(""), "" );
More information about the libcxx-commits
mailing list