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

Function TestErrorWrapper

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

Source from the content-addressed store, hash-verified

300}
301
302func TestErrorWrapper(t *testing.T) {
303 assert := New(t)
304 mockAssert := New(new(testing.T))
305
306 // start with a nil error
307 var err error
308
309 assert.False(mockAssert.Error(err), "Error should return False for nil arg")
310
311 // now set an error
312 err = errors.New("Some error")
313
314 assert.True(mockAssert.Error(err), "Error with error should return True")
315
316}
317
318func TestErrorContainsWrapper(t *testing.T) {
319 assert := New(t)

Callers

nothing calls this directly

Calls 4

NewFunction · 0.70
FalseMethod · 0.45
ErrorMethod · 0.45
TrueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…