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

Function TestOptimizeOr_IdentityFalseRight

pkg/workflow/expression_optimizer_test.go:243–246  ·  view source on GitHub ↗

--------------------------------------------------------------------------- OR – boolean identity (A || false → A) ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

241// ---------------------------------------------------------------------------
242
243func TestOptimizeOr_IdentityFalseRight(t *testing.T) {
244 node := or2(expr("github.event_name == 'issues'"), boolLit(false))
245 assertRender(t, "github.event_name == 'issues'", node, "A || false → A")
246}
247
248func TestOptimizeOr_IdentityFalseLeft(t *testing.T) {
249 node := or2(boolLit(false), expr("github.event_name == 'issues'"))

Callers

nothing calls this directly

Calls 4

or2Function · 0.85
exprFunction · 0.85
boolLitFunction · 0.85
assertRenderFunction · 0.85

Tested by

no test coverage detected