(t *testing.T)
| 2282 | } |
| 2283 | |
| 2284 | func TestClosestCallFavorsFirstMock(t *testing.T) { |
| 2285 | t.Parallel() |
| 2286 | |
| 2287 | defer func() { |
| 2288 | if r := recover(); r != nil { |
| 2289 | diffRegExp := `Difference found in argument 0:\s+--- Expected\s+\+\+\+ Actual\s+@@ -2,4 \+2,4 @@\s+\(bool\) true,\s+- \(bool\) true,\s+- \(bool\) true\s+\+ \(bool\) false,\s+\+ \(bool\) false\s+}\s+Diff: 0: FAIL: \(\[\]bool=\[(true\s?|false\s?){3}]\) != \(\[\]bool=\[(true\s?|false\s?){3}\]\)` |
| 2290 | matchingExp := regexp.MustCompile(unexpectedCallRegex(`TheExampleMethod7([]bool)`, `0: \[\]bool{true, false, false}`, `0: \[\]bool{true, true, true}`, diffRegExp)) |
| 2291 | assert.Regexp(t, matchingExp, r) |
| 2292 | } |
| 2293 | }() |
| 2294 | |
| 2295 | m := new(TestExampleImplementation) |
| 2296 | m.On("TheExampleMethod7", []bool{true, true, true}).Return(nil).Once() |
| 2297 | m.On("TheExampleMethod7", []bool{false, false, false}).Return(nil).Once() |
| 2298 | |
| 2299 | m.TheExampleMethod7([]bool{true, false, false}) |
| 2300 | } |
| 2301 | |
| 2302 | func TestClosestCallUsesRepeatabilityToFindClosest(t *testing.T) { |
| 2303 | t.Parallel() |
nothing calls this directly
no test coverage detected