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

Function TestStringOpcode

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

Source from the content-addressed store, hash-verified

377}
378
379func TestStringOpcode(t *testing.T) {
380 checkStackOpCode(t, SIZE, []Value{"12345"}, []Value{5})
381 checkStackOpCode(t, CAT, []Value{"aaa", "bbb"}, []Value{"aaabbb"})
382 checkStackOpCode(t, SUBSTR, []Value{"aaabbb", 1, 3}, []Value{"aab"})
383 checkStackOpCode(t, LEFT, []Value{"aaabbb", 3}, []Value{"aaa"})
384 checkStackOpCode(t, RIGHT, []Value{"aaabbb", 3}, []Value{"bbb"})
385}
386
387func TestPUSHDATA(t *testing.T) {
388 checkStackOpCode(t, PUSH0, []Value{9999}, []Value{9999, 0})

Callers

nothing calls this directly

Calls 1

checkStackOpCodeFunction · 0.85

Tested by

no test coverage detected