pw_string: Update expected compilation failure message

Bug: b/239856986
Change-Id: I442ee922861309074db0ccdadd7bda936cf61db4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/111592
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Prabhu Karthikeyan Rajasekaran <prabhukr@google.com>
diff --git a/pw_string/string_test.cc b/pw_string/string_test.cc
index aa2f45b..f29a5f1 100644
--- a/pw_string/string_test.cc
+++ b/pw_string/string_test.cc
@@ -349,7 +349,9 @@
   PW_NC_EXPECT("PW_ASSERT\(new_size <= max_size\(\)\)");
   [[maybe_unused]] constexpr InlineString<5> bad_string(kPointer10, 6);
 #elif PW_NC_TEST(Construct_PointerLength_LengthLargerThanInputString)
-  PW_NC_EXPECT_CLANG("dereferenced one-past-the-end pointer");
+  PW_NC_EXPECT_CLANG(
+      "constexpr variable 'bad_string' must be initialized by a constant "
+      "expression");
   PW_NC_EXPECT_GCC("outside the bounds of array type");
   [[maybe_unused]] constexpr InlineString<10> bad_string(kPointer10 + 6, 7);
 #endif  // PW_NC_TEST
@@ -863,7 +865,9 @@
     return str.assign(kPointer10, 6);
   }();
 #elif PW_NC_TEST(Assign_PointerLength_LengthLargerThanInputString)
-  PW_NC_EXPECT_CLANG("dereferenced one-past-the-end pointer");
+  PW_NC_EXPECT_CLANG(
+      "constexpr variable 'bad_string' must be initialized by a constant "
+      "expression");
   PW_NC_EXPECT_GCC("outside the bounds of array type");
   [[maybe_unused]] constexpr auto bad_string = [] {
     InlineString<10> str;