MCPcopy Index your code
hub / github.com/expr-lang/expr / TestImplements

Function TestImplements

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

Source from the content-addressed store, hash-verified

470}
471
472func TestImplements(t *testing.T) {
473
474 mockT := new(testing.T)
475
476 if !Implements(mockT, (*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject)) {
477 t.Error("Implements method should return true: AssertionTesterConformingObject implements AssertionTesterInterface")
478 }
479 if Implements(mockT, (*AssertionTesterInterface)(nil), new(AssertionTesterNonConformingObject)) {
480 t.Error("Implements method should return false: AssertionTesterNonConformingObject does not implements AssertionTesterInterface")
481 }
482 if Implements(mockT, (*AssertionTesterInterface)(nil), nil) {
483 t.Error("Implements method should return false: nil does not implement AssertionTesterInterface")
484 }
485
486}
487
488func TestNotImplements(t *testing.T) {
489

Callers

nothing calls this directly

Calls 2

ImplementsFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…