corbym / gocrest

GoCrest - Hamcrest-like matchers for Go
BSD 3-Clause "New" or "Revised" License
105 stars 7 forks source link

Describe only failed matchers in AllOf #3

Closed corbym closed 1 year ago

corbym commented 3 years ago

AllOf reports all matcher's descriptions when it fails.

Given a number of matchers, when less than all of them fail, we should only report the description of the failing matchers.

jpolack commented 3 years ago

Would be a nice feature, because if I understand right the description has to be changed based on the childMatchers' .Matches result.

Enabling this would make possible to write better descriptions/actuals in general

corbym commented 1 year ago

not sure what I was thinking here, cause it makes no sense for anyOf to fail matching less than all - its criteria is to match ANY of the matchers and pass. I must have meant AllOf..