mirror of
https://github.com/golang/go
synced 2024-11-22 11:34:47 -07:00
- clarify vector comment
- adjusted a test to check claim R=rsc DELTA=3 (2 added, 0 deleted, 1 changed) OCL=34454 CL=34456
This commit is contained in:
parent
a4448a97d8
commit
019e14e32e
@ -12,6 +12,7 @@ type Element interface {}
|
||||
|
||||
|
||||
// Vector is the container itself.
|
||||
// The zero value for Vector is an empty vector ready to use.
|
||||
type Vector struct {
|
||||
a []Element
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ func TestAccess(t *testing.T) {
|
||||
|
||||
func TestInsertDeleteClear(t *testing.T) {
|
||||
const n = 100;
|
||||
a := New(0);
|
||||
var a Vector;
|
||||
|
||||
for i := 0; i < n; i++ {
|
||||
if a.Len() != i { t.Errorf("A) wrong len %d (expected %d)", a.Len(), i) }
|
||||
@ -189,6 +189,7 @@ func TestDo(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func TestIter(t *testing.T) {
|
||||
const Len = 100;
|
||||
x := New(Len);
|
||||
|
Loading…
Reference in New Issue
Block a user