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

Function TestExactlyWrapper

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

Source from the content-addressed store, hash-verified

123}
124
125func TestExactlyWrapper(t *testing.T) {
126 t.Parallel()
127
128 assert := New(new(testing.T))
129
130 a := float32(1)
131 b := float64(1)
132 c := float32(1)
133 d := float32(2)
134
135 if assert.Exactly(a, b) {
136 t.Error("Exactly should return false")
137 }
138 if assert.Exactly(a, d) {
139 t.Error("Exactly should return false")
140 }
141 if !assert.Exactly(a, c) {
142 t.Error("Exactly should return true")
143 }
144
145 if assert.Exactly(nil, a) {
146 t.Error("Exactly should return false")
147 }
148 if assert.Exactly(a, nil) {
149 t.Error("Exactly should return false")
150 }
151
152}
153
154func TestNotEqualWrapper(t *testing.T) {
155 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
ExactlyMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected