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

Function TestCollectAndTerms_AndNode

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

Source from the content-addressed store, hash-verified

1061}
1062
1063func TestCollectAndTerms_AndNode(t *testing.T) {
1064 // collectAndTerms flattens A && (B && C).
1065 a := cmp(prop("a"), "==", str("1"))
1066 b := cmp(prop("b"), "==", str("2"))
1067 c := cmp(prop("c"), "==", str("3"))
1068 terms := collectAndTerms(and2(a, and2(b, c)))
1069 require.Len(t, terms, 3, "should collect 3 terms from nested AND")
1070}
1071
1072func TestRebuildAndChain_Single(t *testing.T) {
1073 a := cmp(prop("a"), "==", str("1"))

Callers

nothing calls this directly

Calls 5

cmpFunction · 0.85
propFunction · 0.85
strFunction · 0.85
collectAndTermsFunction · 0.85
and2Function · 0.85

Tested by

no test coverage detected