mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-01-08 05:45:16 +00:00
21 lines
359 B
Go
21 lines
359 B
Go
|
package stack
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestNextInstruction(t *testing.T) {
|
||
|
// PUSHBYTES1 2
|
||
|
builder := NewBuilder()
|
||
|
builder.EmitBytes([]byte{0x02}) //[]byte{0x01, 0x02}
|
||
|
|
||
|
ctx := NewContext(builder.Bytes())
|
||
|
op := ctx.Next()
|
||
|
byt := ctx.readByte()
|
||
|
|
||
|
assert.Equal(t, PUSHBYTES1, op)
|
||
|
assert.Equal(t, byte(2), byt)
|
||
|
}
|