d1941cfc79
Previously, some of the tests in this file used the `_stringPrefixOf` function to extract the initial part of an error template's text from the `Template` object, and then checked that the initial part of the formatted error message text matched. This change replaces those checks with simpler logic that simply checks the message's code. This paves the way for a follow-up CL that will remove the error template text from the `Template` object. Change-Id: I6a6a69640b075606f3abf3fe0e0d42dccd3e11c7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454960 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>