Lines Matching refs:Cap
1247 // len/cap
1253 if l, m := cv.Len(), cv.Cap(); l != len(c) || m != cap(c) {
1254 t.Errorf("Len/Cap = %d/%d want %d/%d", l, m, len(c), cap(c))
1275 newop := func(n int, cap int) (ch, val Value) {
1278 c := make(chan int, cap)
1282 c := make(chan string, cap)
2880 if cap(v) != 5 {
2881 t.Errorf("cap(xs.Slice(3, 5)) = %d", cap(v))
2891 if cap(v) != 6 {
2892 t.Errorf("cap(xa.Slice(2, 5)) = %d", cap(v))
2919 if cap(v) != 4 {
2920 t.Errorf("cap(xs.Slice3(3, 5, 7)) = %d", cap(v))
2935 if cap(v) != 4 {
2936 t.Errorf("cap(xa.Slice(2, 5, 6)) = %d", cap(v))
2971 if len(xs) != 5 || cap(xs) != 8 {
2972 t.Errorf("after SetLen(5), len, cap = %d, %d, want 5, 8", len(xs), cap(xs))
2975 if len(xs) != 5 || cap(xs) != 6 {
2976 t.Errorf("after SetCap(6), len, cap = %d, %d, want 5, 6", len(xs), cap(xs))
2979 if len(xs) != 5 || cap(xs) != 5 {
2980 t.Errorf("after SetCap(5), len, cap = %d, %d, want 5, 5", len(xs), cap(xs))
2983 shouldPanic(func() { vs.SetLen(6) }) // bigger than cap
5890 func verifyGCBitsSlice(t *testing.T, typ Type, cap int, bits []byte) {
5895 val := MakeSlice(typ, 0, cap)
5896 data := NewAt(ArrayOf(cap, typ), unsafe.Pointer(val.Pointer()))
5900 bits = rep(cap, bits)
5908 t.Errorf("heapBits incorrect for make(%v, 0, %v)\nhave %v\nwant %v", typ, cap, heapBits, bits)