neoneo-go/pkg/vm/compiler/tests/array_test.go
Anthony De Meulemeester 23cfebf621
Compiler (#23)
* implemented add, mul, div, sub assign for identifiers.

* Implemented struct field initialization.

* Implemented imports

* Implemented storage VM API (interop layer) + additional bug fixes when encountered.

* Bumped version 0.12.0

* fixed double point extension on compiled output file.

* Fixed bug where callExpr in returns where added to voidCall

* fixed binExpr compare equal

* Check the env for the gopath first

* removed travis.yml

* custom types + implemented general declarations.

* commented out the storage test to make the build pass
2018-02-24 10:06:48 +01:00

26 lines
447 B
Go

package compiler
var arrayTestCases = []testCase{
{
"assign int array",
`
package foo
func Main() []int {
x := []int{1, 2, 3}
return x
}
`,
"52c56b53525153c16c766b00527ac46203006c766b00c3616c7566",
},
{
"assign string array",
`
package foo
func Main() []string {
x := []string{"foo", "bar", "foobar"}
return x
}
`,
"52c56b06666f6f6261720362617203666f6f53c16c766b00527ac46203006c766b00c3616c7566",
},
}