diff --git a/_examples/hi/test.py b/_examples/hi/test.py index 7b83640..ec922de 100644 --- a/_examples/hi/test.py +++ b/_examples/hi/test.py @@ -141,3 +141,14 @@ for i,o in enumerate(objs): print "--- len(vs):",len(vs) del objs print "--- testing GC... [ok]" + +print "--- testing array..." +arr = hi.GetIntArray() +print "arr:",arr +print "len(arr):",len(arr) + +print "--- testing slice..." +s = hi.GetIntSlice() +print "slice:",s +print "len(slice):",len(s) + diff --git a/main_test.go b/main_test.go index a8d2d16..46aa477 100644 --- a/main_test.go +++ b/main_test.go @@ -137,6 +137,12 @@ hi.Couple{P1=hi.Person{Name="mom", Age=50}, P2=hi.Person{Name="bob", Age=51}} --- len(objs): 100000 --- len(vs): 100000 --- testing GC... [ok] +--- testing array... +arr: [2]int{1, 2} +len(arr): 2 +--- testing slice... +slice: []int{1, 2} +len(slice): 2 `) buf := new(bytes.Buffer) cmd = exec.Command("python2", "./test.py")