mirror of https://github.com/stretchr/testify.git
Unset changes len of a `ExpectedCalls` slice during iteration while using index from original slice, and under some conditions it tries to reslice element beyond of the slice boundaries. That causes panic. The proposed solution uses independent write index to count elements kept in output slice. Tests (the simplest and more complicated cases) and comments are included. |
||
---|---|---|
.. | ||
doc.go | ||
mock.go | ||
mock_test.go |