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

Function TestCollectOrTerms_MixedOrAndDisj

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

Source from the content-addressed store, hash-verified

1044}
1045
1046func TestCollectOrTerms_MixedOrAndDisj(t *testing.T) {
1047 // collectOrTerms flattens OrNode{DisjunctionNode{A,B}, C}.
1048 a := cmp(prop("a"), "==", str("1"))
1049 b := cmp(prop("b"), "==", str("2"))
1050 c := cmp(prop("c"), "==", str("3"))
1051 terms := collectOrTerms(or2(disj(a, b), c))
1052 require.Len(t, terms, 3, "should collect 3 terms from OrNode with DisjunctionNode child")
1053}
1054
1055func TestCollectAndTerms_Flat(t *testing.T) {
1056 // collectAndTerms on a leaf returns just the leaf.

Callers

nothing calls this directly

Calls 6

cmpFunction · 0.85
propFunction · 0.85
strFunction · 0.85
collectOrTermsFunction · 0.85
or2Function · 0.85
disjFunction · 0.85

Tested by

no test coverage detected