mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-28 23:27:36 +00:00
977c431bf1
Rename THROWIFNOT to ASSERT, add ABORT opcode. ABORT cannot be caught, but the implementation should be postponed until exception handling is implemented.
20 lines
326 B
Go
20 lines
326 B
Go
package opcode
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
// Nothing more to test here, really.
|
|
func TestStringer(t *testing.T) {
|
|
tests := map[Opcode]string{
|
|
ADD: "ADD",
|
|
SUB: "SUB",
|
|
ASSERT: "ASSERT",
|
|
0xff: "Opcode(255)",
|
|
}
|
|
for o, s := range tests {
|
|
assert.Equal(t, s, o.String())
|
|
}
|
|
}
|