mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
parent
e230040c2e
commit
36295357d8
5 changed files with 30 additions and 2 deletions
|
@ -116,6 +116,18 @@ func TestFromAddress(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestAbort(t *testing.T) {
|
||||
src := `package foo
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop/util"
|
||||
func Main() int {
|
||||
util.Abort()
|
||||
return 1
|
||||
}`
|
||||
v := vmAndCompile(t, src)
|
||||
require.Error(t, v.Run())
|
||||
require.True(t, v.HasFailed())
|
||||
}
|
||||
|
||||
func spawnVM(t *testing.T, ic *interop.Context, src string) *vm.VM {
|
||||
b, di, err := compiler.CompileWithDebugInfo("foo.go", strings.NewReader(src))
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue