neoneo-go/pkg/vm/tests/type_test.go

25 lines
352 B
Go
Raw Normal View History

2018-04-22 18:11:37 +00:00
package vm_test
import "testing"
func TestCustomType(t *testing.T) {
src := `
package foo
type bar int
type specialString string
func Main() specialString {
var x bar
var str specialString
x = 10
str = "some short string"
if x == 10 {
return str
}
return "none"
}
`
eval(t, src, []byte("some short string"))
}