MCPcopy Create free account
hub / github.com/DNAProject/DNA / TestAltStackOpCode

Function TestAltStackOpCode

vm/neovm/stack_opcode_test.go:155–179  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

153}
154
155func TestAltStackOpCode(t *testing.T) {
156 checkAltStackOpCode(t, DUPFROMALTSTACK, [2][]Value{
157 {8888},
158 {9999},
159 }, [2][]Value{
160 {8888, 9999},
161 {9999},
162 })
163
164 checkAltStackOpCode(t, TOALTSTACK, [2][]Value{
165 {8888},
166 {9999},
167 }, [2][]Value{
168 {},
169 {9999, 8888},
170 })
171
172 checkAltStackOpCode(t, FROMALTSTACK, [2][]Value{
173 {8888},
174 {9999},
175 }, [2][]Value{
176 {8888, 9999},
177 {},
178 })
179}
180
181func TestStackOpCode(t *testing.T) {
182 checkStackOpCode(t, SWAP, []Value{1, 2}, []Value{2, 1})

Callers

nothing calls this directly

Calls 1

checkAltStackOpCodeFunction · 0.85

Tested by

no test coverage detected