truth icon indicating copy to clipboard operation
truth copied to clipboard

If matches(x) fails but containsMatch(x) would have passed, suggest containsMatch in the failure message

Open cpovirk opened this issue 4 years ago • 1 comments

Similar in spirit to https://github.com/google/truth/issues/783.

assertThat("foo bar baz").matches("ba[rz]");
<normal failure message>
Did you mean to call containsMatch() instead of match()?

cpovirk avatar Nov 25 '20 16:11 cpovirk

Hi @cpovirk, I made a PR for this issue https://github.com/google/truth/pull/830, could you review it? Thanks.

junyan59 avatar Mar 01 '21 18:03 junyan59