MCPcopy Create free account
hub / github.com/stretchr/testify / TestIsType

Function TestIsType

assert/assertions_test.go:554–565  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

552}
553
554func TestIsType(t *testing.T) {
555
556 mockT := new(testing.T)
557
558 if !IsType(mockT, new(AssertionTesterConformingObject), new(AssertionTesterConformingObject)) {
559 t.Error("IsType should return true: AssertionTesterConformingObject is the same type as AssertionTesterConformingObject")
560 }
561 if IsType(mockT, new(AssertionTesterConformingObject), new(AssertionTesterNonConformingObject)) {
562 t.Error("IsType should return false: AssertionTesterConformingObject is not the same type as AssertionTesterNonConformingObject")
563 }
564
565}
566
567func TestEqual(t *testing.T) {
568 type myType string

Callers

nothing calls this directly

Calls 2

IsTypeFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected