neoneo-go/pkg/vm/tests/import_test.go
Anthony De Meulemeester 648563c3e2
Compiler (#73)
Compiler and VM update
2018-04-22 20:11:37 +02:00

36 lines
532 B
Go

package vm_test
import (
"math/big"
"testing"
)
func TestImportFunction(t *testing.T) {
src := `
package somethingelse
import "github.com/CityOfZion/neo-go/pkg/vm/tests/foo"
func Main() int {
i := foo.NewBar()
return i
}
`
eval(t, src, big.NewInt(10))
}
func TestImportStruct(t *testing.T) {
src := `
package somethingwedontcareabout
import "github.com/CityOfZion/neo-go/pkg/vm/tests/bar"
func Main() int {
b := bar.Bar{
X: 4,
}
return b.Y
}
`
eval(t, src, big.NewInt(0))
}