MCPcopy
hub / github.com/expr-lang/expr / NoError

Method NoError

internal/testify/assert/assertion_forward.go:1067–1072  ·  view source on GitHub ↗

NoError asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if a.NoError(err) { assert.Equal(t, expectedObj, actualObj) }

(err error, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1065// assert.Equal(t, expectedObj, actualObj)
1066// }
1067func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool {
1068 if h, ok := a.t.(tHelper); ok {
1069 h.Helper()
1070 }
1071 return NoError(a.t, err, msgAndArgs...)
1072}
1073
1074// NoErrorf asserts that a function returned no error (i.e. `nil`).
1075//

Callers 1

TestNoErrorWrapperFunction · 0.45

Calls 2

NoErrorFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestNoErrorWrapperFunction · 0.36