diff options
author | Russ Cox <rsc@golang.org> | 2009-08-10 22:02:51 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-08-10 22:02:51 -0700 |
commit | 7d657727e474218ed8f7e8f0b07dc4c732ae7b0f (patch) | |
tree | a6b5393525d44f9d327bee47d3457d1a517c379b /src/pkg/container | |
parent | 3502390eb743954f20c39438ebb7df93050d4b19 (diff) | |
download | golang-7d657727e474218ed8f7e8f0b07dc4c732ae7b0f.tar.gz |
remove unnecessary pkg. references
R=r
DELTA=95 (0 added, 0 deleted, 95 changed)
OCL=33012
CL=33012
Diffstat (limited to 'src/pkg/container')
-rw-r--r-- | src/pkg/container/vector/intvector.go | 2 | ||||
-rw-r--r-- | src/pkg/container/vector/stringvector.go | 2 | ||||
-rw-r--r-- | src/pkg/container/vector/vector_test.go | 34 |
3 files changed, 19 insertions, 19 deletions
diff --git a/src/pkg/container/vector/intvector.go b/src/pkg/container/vector/intvector.go index c3b62f256..ca2c4d103 100644 --- a/src/pkg/container/vector/intvector.go +++ b/src/pkg/container/vector/intvector.go @@ -8,7 +8,7 @@ import "container/vector" // IntVector is a specialization of Vector that hides the wrapping of Elements around ints. type IntVector struct { - vector.Vector; + Vector; } diff --git a/src/pkg/container/vector/stringvector.go b/src/pkg/container/vector/stringvector.go index 18ca11a3f..4cf047f2c 100644 --- a/src/pkg/container/vector/stringvector.go +++ b/src/pkg/container/vector/stringvector.go @@ -8,7 +8,7 @@ import "container/vector" // StringVector is a specialization of Vector that hides the wrapping of Elements around strings. type StringVector struct { - vector.Vector; + Vector; } diff --git a/src/pkg/container/vector/vector_test.go b/src/pkg/container/vector/vector_test.go index 2a9819394..8b4f54dae 100644 --- a/src/pkg/container/vector/vector_test.go +++ b/src/pkg/container/vector/vector_test.go @@ -11,15 +11,15 @@ import "fmt" func TestZeroLen(t *testing.T) { - var a *vector.Vector; + var a *Vector; if a.Len() != 0 { t.Errorf("A) expected 0, got %d", a.Len()); } - a = vector.New(0); + a = New(0); if a.Len() != 0 { t.Errorf("B) expected 0, got %d", a.Len()); } } func TestInit(t *testing.T) { - var a vector.Vector; + var a Vector; if a.Init(0).Len() != 0 { t.Error("A") } if a.Init(1).Len() != 1 { t.Error("B") } if a.Init(10).Len() != 10 { t.Error("C") } @@ -27,9 +27,9 @@ func TestInit(t *testing.T) { func TestNew(t *testing.T) { - if vector.New(0).Len() != 0 { t.Error("A") } - if vector.New(1).Len() != 1 { t.Error("B") } - if vector.New(10).Len() != 10 { t.Error("C") } + if New(0).Len() != 0 { t.Error("A") } + if New(1).Len() != 1 { t.Error("B") } + if New(10).Len() != 10 { t.Error("C") } } @@ -40,7 +40,7 @@ func val(i int) int { func TestAccess(t *testing.T) { const n = 100; - var a vector.Vector; + var a Vector; a.Init(n); for i := 0; i < n; i++ { a.Set(i, val(i)); @@ -53,7 +53,7 @@ func TestAccess(t *testing.T) { func TestInsertDeleteClear(t *testing.T) { const n = 100; - a := vector.New(0); + a := New(0); for i := 0; i < n; i++ { if a.Len() != i { t.Errorf("A) wrong len %d (expected %d)", a.Len(), i) } @@ -90,7 +90,7 @@ func TestInsertDeleteClear(t *testing.T) { } -func verify_slice(t *testing.T, x *vector.Vector, elt, i, j int) { +func verify_slice(t *testing.T, x *Vector, elt, i, j int) { for k := i; k < j; k++ { if x.At(k).(int) != elt { t.Errorf("M) wrong [%d] element %d (expected %d)", k, x.At(k).(int), elt) @@ -106,7 +106,7 @@ func verify_slice(t *testing.T, x *vector.Vector, elt, i, j int) { } -func verify_pattern(t *testing.T, x *vector.Vector, a, b, c int) { +func verify_pattern(t *testing.T, x *Vector, a, b, c int) { n := a + b + c; if x.Len() != n { t.Errorf("O) wrong len %d (expected %d)", x.Len(), n) @@ -117,8 +117,8 @@ func verify_pattern(t *testing.T, x *vector.Vector, a, b, c int) { } -func make_vector(elt, len int) *vector.Vector { - x := vector.New(len); +func make_vector(elt, len int) *Vector { + x := New(len); for i := 0; i < len; i++ { x.Set(i, elt); } @@ -154,13 +154,13 @@ func TestInsertVector(t *testing.T) { func TestSorting(t *testing.T) { const n = 100; - a := vector.NewIntVector(n); + a := NewIntVector(n); for i := n-1; i >= 0; i-- { a.Set(i, n-1-i); } if sort.IsSorted(a) { t.Error("int vector not sorted") } - b := vector.NewStringVector(n); + b := NewStringVector(n); for i := n-1; i >= 0; i-- { b.Set(i, fmt.Sprint(n-1-i)); } @@ -171,13 +171,13 @@ func TestSorting(t *testing.T) { func TestDo(t *testing.T) { const n = 25; const salt = 17; - a := vector.NewIntVector(n); + a := NewIntVector(n); for i := 0; i < n; i++ { a.Set(i, salt * i); } count := 0; a.Do( - func(e vector.Element) { + func(e Element) { i := e.(int); if i != count*salt { t.Error("value at", count, "should be", count*salt, "not", i) @@ -192,7 +192,7 @@ func TestDo(t *testing.T) { func TestIter(t *testing.T) { const Len = 100; - x := vector.New(Len); + x := New(Len); for i := 0; i < Len; i++ { x.Set(i, i*i); } |