update: log reason output only if failed

This commit is contained in:
鈴木 光 2023-03-09 18:49:15 +09:00
parent f36bfe3c33
commit 75b9b6dfff

View File

@ -598,8 +598,8 @@ func (m *Mock) AssertExpectations(t TestingT) bool {
satisfied, reason := m.checkExpectation(expectedCall)
if !satisfied {
failedExpectations++
t.Logf(reason)
}
t.Logf(reason)
}
if failedExpectations != 0 {