neo-go/pkg/vm/stack/array_test.go
Roman Khimov 1fb66d6b73 pkg/vm/stack: improve Array testing code slightly
GolangCI complained:
  testArray is unused (from deadcode)

But this function was actually wrong being a copy-paste of testMakeStackMap(),
it also didn't conform to testMake... naming scheme, so this fixes it. To make
thing more uniform NewArray() was also changed to return error, map_test.go
code adjusted to this changes and finally array_test.go was added as a stub
for future Array testing.
2019-08-12 17:12:05 +03:00

16 lines
329 B
Go

package stack
import (
"testing"
// it's a stub at the moment, but will need it anyway
// "github.com/stretchr/testify/assert"
)
func TestArray(t *testing.T) {
var a Item = testMakeStackInt(t, 3)
var b Item = testMakeStackInt(t, 6)
var c Item = testMakeStackInt(t, 9)
var ta = testMakeArray(t, []Item{a, b, c})
_ = ta
}