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

Function TestRebuildAndChain_Three

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

Source from the content-addressed store, hash-verified

1083}
1084
1085func TestRebuildAndChain_Three(t *testing.T) {
1086 a := cmp(prop("a"), "==", str("1"))
1087 b := cmp(prop("b"), "==", str("2"))
1088 c := cmp(prop("c"), "==", str("3"))
1089 result := rebuildAndChain([]ConditionNode{a, b, c})
1090 // Left-folded: (a && b) && c
1091 assert.Equal(t, "a == '1' && b == '2' && c == '3'", result.Render(), "three terms rebuild as left-folded AND chain")
1092}
1093
1094// ---------------------------------------------------------------------------
1095// Z3-inspired rules: Absorption, Subsumption, Resolution, Factoring

Callers

nothing calls this directly

Calls 5

cmpFunction · 0.85
propFunction · 0.85
strFunction · 0.85
rebuildAndChainFunction · 0.85
RenderMethod · 0.65

Tested by

no test coverage detected