4c89523e4f
Currently, the failure message for EXPECT_STREQ just prints the
(escaped) expected and actual strings on failure, but if the
expected and actual strings are mostly the same, it can be difficult
to determine what the difference actually is.
Instead, do a bit of work to find the common prefix and suffix of
the expected and actual strings, so that the actual difference is
more apparent. If the lengths of the common prefix and suffix
combined is considered too short to separately print them, then
the output is the same as before.
TEST=ci (failure output change only, so tested with
vm/cc/SourceReport_Coverage output on vm-dyn-linux-debug-x64)
Change-Id: Iecaacde6ebf6628643bdf1440c6d77d4ff6599af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495980
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>