diff --git a/assert/assertions_test.go b/assert/assertions_test.go index 2f6e9a2..8eb02dc 100644 --- a/assert/assertions_test.go +++ b/assert/assertions_test.go @@ -690,7 +690,7 @@ func TestNoError(t *testing.T) { }() if err == nil { // err is not nil here! - t.Error("Error should be nil due to empty interface", err) + t.Errorf("Error should be nil due to empty interface: %s", err) } False(t, NoError(mockT, err), "NoError should fail with empty error interface") @@ -724,7 +724,7 @@ func TestError(t *testing.T) { }() if err == nil { // err is not nil here! - t.Error("Error should be nil due to empty interface", err) + t.Errorf("Error should be nil due to empty interface: %s", err) } True(t, Error(mockT, err), "Error should pass with empty error interface")