MCPcopy
hub / github.com/expr-lang/expr / TestIssue567

Function TestIssue567

test/issues/567/issue_test.go:12–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestIssue567(t *testing.T) {
13 program, err := expr.Compile("concat(1..2, 3..4)")
14 require.NoError(t, err)
15
16 var buf bytes.Buffer
17 program.DisassembleWriter(&buf)
18 output := buf.String()
19
20 // Check if "concat" is mentioned in the output
21 require.True(t, strings.Contains(output, "concat"), "expected 'concat' in disassembly output")
22
23 // It should appear as a pushed constant
24 require.True(t, strings.Contains(output, "OpPush\t<4>\tconcat"), "expected 'OpPush <4> concat' in disassembly output")
25}

Callers

nothing calls this directly

Calls 6

CompileFunction · 0.92
NoErrorFunction · 0.92
TrueFunction · 0.92
DisassembleWriterMethod · 0.80
StringMethod · 0.65
ContainsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…