MCPcopy Create free account
hub / github.com/expr-lang/expr / TestNotImplements

Function TestNotImplements

internal/testify/assert/assertions_test.go:488–502  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

486}
487
488func TestNotImplements(t *testing.T) {
489
490 mockT := new(testing.T)
491
492 if !NotImplements(mockT, (*AssertionTesterInterface)(nil), new(AssertionTesterNonConformingObject)) {
493 t.Error("NotImplements method should return true: AssertionTesterNonConformingObject does not implement AssertionTesterInterface")
494 }
495 if NotImplements(mockT, (*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject)) {
496 t.Error("NotImplements method should return false: AssertionTesterConformingObject implements AssertionTesterInterface")
497 }
498 if NotImplements(mockT, (*AssertionTesterInterface)(nil), nil) {
499 t.Error("NotImplements method should return false: nil can't be checked to be implementing AssertionTesterInterface or not")
500 }
501
502}
503
504func TestIsType(t *testing.T) {
505

Callers

nothing calls this directly

Calls 2

NotImplementsFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…