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

Function TestConditionWrapper

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

Source from the content-addressed store, hash-verified

243}
244
245func TestConditionWrapper(t *testing.T) {
246 t.Parallel()
247
248 assert := New(new(testing.T))
249
250 if !assert.Condition(func() bool { return true }, "Truth") {
251 t.Error("Condition should return true")
252 }
253
254 if assert.Condition(func() bool { return false }, "Lie") {
255 t.Error("Condition should return false")
256 }
257
258}
259
260func TestDidPanicWrapper(t *testing.T) {
261 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
ConditionMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected