[libc] [obvious] Fix strchr and strrchr tests so that constness is
actually verified.

GitOrigin-RevId: 5954755939febabcf1edb52b53214f25f06ce584
diff --git a/test/src/string/strchr_test.cpp b/test/src/string/strchr_test.cpp
index 37b3733..dda930c 100644
--- a/test/src/string/strchr_test.cpp
+++ b/test/src/string/strchr_test.cpp
@@ -11,42 +11,38 @@
 
 TEST(StrChrTest, FindsFirstCharacter) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return original string since 'a' is the first character.
   ASSERT_STREQ(__llvm_libc::strchr(src, 'a'), "abcde");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrChrTest, FindsMiddleCharacter) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return characters after (and including) 'c'.
   ASSERT_STREQ(__llvm_libc::strchr(src, 'c'), "cde");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrChrTest, FindsLastCharacterThatIsNotNullTerminator) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return 'e' and null-terminator.
   ASSERT_STREQ(__llvm_libc::strchr(src, 'e'), "e");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrChrTest, FindsNullTerminator) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return null terminator.
   ASSERT_STREQ(__llvm_libc::strchr(src, '\0'), "");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrChrTest, CharacterNotWithinStringShouldReturnNullptr) {
@@ -56,16 +52,15 @@
 
 TEST(StrChrTest, TheSourceShouldNotChange) {
   const char *src = "abcde";
-  const char *src_copy = src;
   // When the character is found, the source string should not change.
   __llvm_libc::strchr(src, 'd');
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
   // Same case for when the character is not found.
   __llvm_libc::strchr(src, 'z');
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
   // Same case for when looking for nullptr.
   __llvm_libc::strchr(src, '\0');
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrChrTest, ShouldFindFirstOfDuplicates) {
diff --git a/test/src/string/strrchr_test.cpp b/test/src/string/strrchr_test.cpp
index cf29de2..5ed83aa 100644
--- a/test/src/string/strrchr_test.cpp
+++ b/test/src/string/strrchr_test.cpp
@@ -11,42 +11,38 @@
 
 TEST(StrRChrTest, FindsFirstCharacter) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return original string since 'a' is the first character.
   ASSERT_STREQ(__llvm_libc::strrchr(src, 'a'), "abcde");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrRChrTest, FindsMiddleCharacter) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return characters after (and including) 'c'.
   ASSERT_STREQ(__llvm_libc::strrchr(src, 'c'), "cde");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrRChrTest, FindsLastCharacterThatIsNotNullTerminator) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return 'e' and null-terminator.
   ASSERT_STREQ(__llvm_libc::strrchr(src, 'e'), "e");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrRChrTest, FindsNullTerminator) {
   const char *src = "abcde";
-  const char *src_copy = src;
 
   // Should return null terminator.
   ASSERT_STREQ(__llvm_libc::strrchr(src, '\0'), "");
   // Source string should not change.
-  ASSERT_STREQ(src, src_copy);
+  ASSERT_STREQ(src, "abcde");
 }
 
 TEST(StrRChrTest, FindsLastBehindFirstNullTerminator) {