Merge pull request #153 from lummie/lummie-patch-1

Fix "go vet" errors for incorrect printf verb
pull/156/head
Davide D'Agostino 2015-04-17 12:06:42 -07:00
commit 1d30fbccfe
1 changed files with 2 additions and 2 deletions

View File

@ -286,7 +286,7 @@ func (m *Mock) AssertNumberOfCalls(t TestingT, methodName string, expectedCalls
// AssertCalled asserts that the method was called.
func (m *Mock) AssertCalled(t TestingT, methodName string, arguments ...interface{}) bool {
if !assert.True(t, m.methodWasCalled(methodName, arguments), fmt.Sprintf("The \"%s\" method should have been called with %d argument(s), but was not.", methodName, len(arguments))) {
t.Logf("%s", m.ExpectedCalls)
t.Logf("%v", m.ExpectedCalls)
return false
}
return true
@ -295,7 +295,7 @@ func (m *Mock) AssertCalled(t TestingT, methodName string, arguments ...interfac
// AssertNotCalled asserts that the method was not called.
func (m *Mock) AssertNotCalled(t TestingT, methodName string, arguments ...interface{}) bool {
if !assert.False(t, m.methodWasCalled(methodName, arguments), fmt.Sprintf("The \"%s\" method was called with %d argument(s), but should NOT have been.", methodName, len(arguments))) {
t.Logf("%s", m.ExpectedCalls)
t.Logf("%v", m.ExpectedCalls)
return false
}
return true