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

Function TestProgram_Disassemble

vm/program_test.go:10–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestProgram_Disassemble(t *testing.T) {
11 for op := vm.OpPush; op < vm.OpEnd; op++ {
12 program := vm.Program{
13 Constants: []any{1, 2},
14 Bytecode: []vm.Opcode{op},
15 Arguments: []int{1},
16 }
17 d := program.Disassemble()
18 if strings.Contains(d, "(unknown)") {
19 t.Errorf("cannot disassemble all opcodes")
20 }
21 }
22}

Callers

nothing calls this directly

Calls 3

DisassembleMethod · 0.95
ErrorfMethod · 0.65
ContainsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…