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

Function TestCondition

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

Source from the content-addressed store, hash-verified

1320}
1321
1322func TestCondition(t *testing.T) {
1323 mockT := new(testing.T)
1324
1325 if !Condition(mockT, func() bool { return true }, "Truth") {
1326 t.Error("Condition should return true")
1327 }
1328
1329 if Condition(mockT, func() bool { return false }, "Lie") {
1330 t.Error("Condition should return false")
1331 }
1332
1333}
1334
1335func TestDidPanic(t *testing.T) {
1336

Callers

nothing calls this directly

Calls 2

ConditionFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…