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

Function TestCollectOrTerms_OrNode

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

Source from the content-addressed store, hash-verified

1027}
1028
1029func TestCollectOrTerms_OrNode(t *testing.T) {
1030 // collectOrTerms flattens a two-level OR.
1031 a := cmp(prop("a"), "==", str("1"))
1032 b := cmp(prop("b"), "==", str("2"))
1033 c := cmp(prop("c"), "==", str("3"))
1034 terms := collectOrTerms(or2(or2(a, b), c))
1035 require.Len(t, terms, 3, "should collect 3 terms from nested OR")
1036}
1037
1038func TestCollectOrTerms_DisjunctionNode(t *testing.T) {
1039 // collectOrTerms flattens a DisjunctionNode.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected