test icon indicating copy to clipboard operation
test copied to clipboard

Matcher should always call describeMismatch of a nested macther

Open DartBot opened this issue 10 years ago • 5 comments

Originally opened as dart-lang/sdk#14068

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. Create a Matcher with has a describeMismatch method
  2. Create a falling unittest with the Matcher in the isNot-Matcher: isNot(myMatcher)

What is the expected output? What do you see instead? Expected:


Expected: not <my description>   Actual: <value>    Which: <my mismatch description>

Actual:


Expected: not <my description>   Actual: <value>

What version of the product are you using? On what operating system? Dart VM version: 0.8.1.2_r28355 (Tue Oct 08 06:29:27 2013) on "windows_ia32"

Please provide any additional information below. All matcher that contain other matcher should add the nested description. At least isNot is missing that.

DartBot avatar Jun 05 '15 22:06 DartBot

<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo


Removed Pkg-Unittest label. Added Pkg-matcher label.

DartBot avatar Jun 05 '15 22:06 DartBot

I am writing my own matcher currently, and I just realized that my neat formatting is thrown out the window as soon as I combine my matcher with an isNot(...) matcher. It might not be trivial to solve but it would be nice to be able to provide some message here.

SandPod avatar Mar 12 '25 14:03 SandPod