--------------------------------------------------------------------------- Utility function tests (white-box) ---------------------------------------------------------------------------
(t *testing.T)
| 1019 | // --------------------------------------------------------------------------- |
| 1020 | |
| 1021 | func TestCollectOrTerms_Flat(t *testing.T) { |
| 1022 | // collectOrTerms on a leaf returns just the leaf. |
| 1023 | a := cmp(prop("a"), "==", str("1")) |
| 1024 | terms := collectOrTerms(a) |
| 1025 | require.Len(t, terms, 1, "leaf should produce one term") |
| 1026 | assert.Equal(t, "a == '1'", terms[0].Render()) |
| 1027 | } |
| 1028 | |
| 1029 | func TestCollectOrTerms_OrNode(t *testing.T) { |
| 1030 | // collectOrTerms flattens a two-level OR. |
nothing calls this directly
no test coverage detected