Home | History | Annotate | Download | only in reflect

Lines Matching refs:Cap

1122 	// len/cap
1128 if l, m := cv.Len(), cv.Cap(); l != len(c) || m != cap(c) {
1129 t.Errorf("Len/Cap = %d/%d want %d/%d", l, m, len(c), cap(c))
1150 newop := func(n int, cap int) (ch, val Value) {
1153 c := make(chan int, cap)
1157 c := make(chan string, cap)
2660 if cap(v) != 5 {
2661 t.Errorf("cap(xs.Slice(3, 5)) = %d", cap(v))
2671 if cap(v) != 6 {
2672 t.Errorf("cap(xa.Slice(2, 5)) = %d", cap(v))
2699 if cap(v) != 4 {
2700 t.Errorf("cap(xs.Slice3(3, 5, 7)) = %d", cap(v))
2715 if cap(v) != 4 {
2716 t.Errorf("cap(xa.Slice(2, 5, 6)) = %d", cap(v))
2751 if len(xs) != 5 || cap(xs) != 8 {
2752 t.Errorf("after SetLen(5), len, cap = %d, %d, want 5, 8", len(xs), cap(xs))
2755 if len(xs) != 5 || cap(xs) != 6 {
2756 t.Errorf("after SetCap(6), len, cap = %d, %d, want 5, 6", len(xs), cap(xs))
2759 if len(xs) != 5 || cap(xs) != 5 {
2760 t.Errorf("after SetCap(5), len, cap = %d, %d, want 5, 5", len(xs), cap(xs))
2763 shouldPanic(func() { vs.SetLen(6) }) // bigger than cap
5560 func verifyGCBitsSlice(t *testing.T, typ Type, cap int, bits []byte) {
5565 val := MakeSlice(typ, 0, cap)
5566 data := NewAt(ArrayOf(cap, typ), unsafe.Pointer(val.Pointer()))
5570 bits = rep(cap, bits)
5578 t.Errorf("heapBits incorrect for make(%v, 0, %v)\nhave %v\nwant %v", typ, cap, heapBits, bits)