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

Function TestContainsStatusFunc

pkg/workflow/expression_optimizer_test.go:785–792  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

783}
784
785func TestContainsStatusFunc(t *testing.T) {
786 assert.True(t, containsStatusFunc(fn("always")), "direct always()")
787 assert.True(t, containsStatusFunc(not1(fn("cancelled"))), "!cancelled() contains status func")
788 assert.True(t, containsStatusFunc(and2(fn("success"), expr("x"))), "success() in AND")
789 assert.False(t, containsStatusFunc(expr("github.event_name == 'issues'")), "plain expr has no status func")
790 assert.False(t, containsStatusFunc(fn("contains", prop("x"), str("y"))), "contains has no status func")
791 assert.False(t, containsStatusFunc(and2(expr("a"), expr("b"))), "plain AND has no status func")
792}
793
794func TestIsNegationOf(t *testing.T) {
795 a := expr("github.event_name == 'issues'")

Callers

nothing calls this directly

Calls 7

containsStatusFuncFunction · 0.85
fnFunction · 0.85
not1Function · 0.85
and2Function · 0.85
exprFunction · 0.85
propFunction · 0.85
strFunction · 0.85

Tested by

no test coverage detected