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

Function TestEqualErrorWrapper

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

Source from the content-addressed store, hash-verified

335}
336
337func TestEqualErrorWrapper(t *testing.T) {
338 assert := New(t)
339 mockAssert := New(new(testing.T))
340
341 // start with a nil error
342 var err error
343 assert.False(mockAssert.EqualError(err, ""),
344 "EqualError should return false for nil arg")
345
346 // now set an error
347 err = errors.New("some error")
348 assert.False(mockAssert.EqualError(err, "Not some error"),
349 "EqualError should return false for different error string")
350 assert.True(mockAssert.EqualError(err, "some error"),
351 "EqualError should return true")
352}
353
354func TestEmptyWrapper(t *testing.T) {
355 assert := New(t)

Callers

nothing calls this directly

Calls 4

NewFunction · 0.70
FalseMethod · 0.45
EqualErrorMethod · 0.45
TrueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…