MCPcopy
hub / github.com/stretchr/testify / TestImplementsWrapper

Function TestImplementsWrapper

assert/forward_assertions_test.go:10–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestImplementsWrapper(t *testing.T) {
11 t.Parallel()
12
13 assert := New(new(testing.T))
14
15 if !assert.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject)) {
16 t.Error("Implements method should return true: AssertionTesterConformingObject implements AssertionTesterInterface")
17 }
18 if assert.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterNonConformingObject)) {
19 t.Error("Implements method should return false: AssertionTesterNonConformingObject does not implements AssertionTesterInterface")
20 }
21}
22
23func TestIsTypeWrapper(t *testing.T) {
24 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
ImplementsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected