mirror of
https://github.com/tursom/GoCollections.git
synced 2025-02-26 20:20:31 +08:00
20 lines
312 B
Go
20 lines
312 B
Go
package util
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/tursom/GoCollections/lang"
|
|
"testing"
|
|
)
|
|
|
|
func Test_arrayList_Get(t *testing.T) {
|
|
l := arrayList[lang.Int]{array: []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)
|
|
}
|
|
}
|
|
}
|