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

Function TestNoErrorWrapper

internal/testify/assert/forward_assertions_test.go:286–300  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

284}
285
286func TestNoErrorWrapper(t *testing.T) {
287 assert := New(t)
288 mockAssert := New(new(testing.T))
289
290 // start with a nil error
291 var err error
292
293 assert.True(mockAssert.NoError(err), "NoError should return True for nil arg")
294
295 // now set an error
296 err = errors.New("Some error")
297
298 assert.False(mockAssert.NoError(err), "NoError with error should return False")
299
300}
301
302func TestErrorWrapper(t *testing.T) {
303 assert := New(t)

Callers

nothing calls this directly

Calls 4

NewFunction · 0.70
TrueMethod · 0.45
NoErrorMethod · 0.45
FalseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…