GoCollections/util/arrayList_test.go
2022-03-21 11:02:41 +08:00

20 lines
306 B
Go

package util
import (
"fmt"
"github.com/tursom/GoCollections/lang"
"testing"
)
func Test_arrayList_Get(t *testing.T) {
l := &arrayList[lang.Int]{[]lang.Int{1, 2}}
for i := 0; i < l.Size()+1; i++ {
r, err := l.Get(i)
if err != nil {
err.PrintStackTrace()
} else {
fmt.Println(r)
}
}
}