MCPcopy Create free account
hub / github.com/github/gh-aw / TestOptimizeAnd_IdentityTrueRight

Function TestOptimizeAnd_IdentityTrueRight

pkg/workflow/expression_optimizer_test.go:166–169  ·  view source on GitHub ↗

--------------------------------------------------------------------------- AND – boolean identity (A && true → A) ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

164// ---------------------------------------------------------------------------
165
166func TestOptimizeAnd_IdentityTrueRight(t *testing.T) {
167 node := and2(expr("github.event_name == 'issues'"), boolLit(true))
168 assertRender(t, "github.event_name == 'issues'", node, "A && true → A")
169}
170
171func TestOptimizeAnd_IdentityTrueLeft(t *testing.T) {
172 node := and2(boolLit(true), expr("github.event_name == 'issues'"))

Callers

nothing calls this directly

Calls 4

and2Function · 0.85
exprFunction · 0.85
boolLitFunction · 0.85
assertRenderFunction · 0.85

Tested by

no test coverage detected