Skip to content

Commit dfa5bfa

Browse files
committed
🎨 go-06
1 parent 66feca2 commit dfa5bfa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

go-06/array_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,12 @@ func TestSliceInit(t *testing.T) {
3333

3434
s2:=make ([]int,2,3)
3535
t.Log(len(s2),cap(s2))
36+
}
37+
38+
func TestSliceGrowing(t *testing.T) {
39+
s:=[]int{}
40+
for i:=0;i<10 ;i++ {
41+
s=append(s,i)
42+
t.Log(len(s),cap(s))
43+
}
3644
}

0 commit comments

Comments
 (0)