I realized after #85 that I made a false assumption: I though multiple messages could be displayed but as it turns ou only one failure can be stored for each test.
The issue is that gomock does that:
failures := ctrl.expectedCalls.Failures()
for _, call := range failures {
ctrl.T.Errorf("missing call(s) to %v", call)
}
if len(failures) != 0 {
ctrl.T.Fatalf("aborting test due to missing call(s)")
}
With the Errorf methods introduced by the original testify patch each successive call to Errorf and then Fatalf overwrite the previous one.
Adding support for multiple erros would allow logging non fatal errors like this:
g.Errrof("this should take less than 10ms")
g.Fatalf("X is different than 10")
I can give it a try but is that something that could be merged ?
I realized after #85 that I made a false assumption: I though multiple messages could be displayed but as it turns ou only one
failure
can be stored for each test.The issue is that
gomock
does that:With the
Errorf
methods introduced by the original testify patch each successive call toErrorf
and thenFatalf
overwrite the previous one.Adding support for multiple erros would allow logging non fatal errors like this:
I can give it a try but is that something that could be merged ?