summaryrefslogtreecommitdiff
path: root/reference_test.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2013-06-17 02:08:13 +0200
committerCarlos Martín Nieto <[email protected]>2013-06-17 02:08:13 +0200
commitf5fc7e5f784348b469eb8d2125af75b6b4b0d14e (patch)
treecb17c4c270a1030582595217c461e1f9c152a88f /reference_test.go
parenta33875f9c5479b8bb78835b630ce60507c70f2a8 (diff)
Reference: adjust to iterator changes
The Library's iterators now can return either the reference or the reference's name. As the name is what we're set up for, rename the functions appropriately so we compile against altest development.
Diffstat (limited to 'reference_test.go')
-rw-r--r--reference_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/reference_test.go b/reference_test.go
index 6ac4ece..77afaeb 100644
--- a/reference_test.go
+++ b/reference_test.go
@@ -5,6 +5,7 @@ import (
"runtime"
"sort"
"testing"
+ "time"
)
func TestRefModification(t *testing.T) {
@@ -98,10 +99,10 @@ func TestIterator(t *testing.T) {
}
// test some manual iteration
- name, err := iter.Next()
+ name, err := iter.NextName()
for err == nil {
list = append(list, name)
- name, err = iter.Next()
+ name, err = iter.NextName()
}
if err != ErrIterOver {
t.Fatal("Iteration not over")
@@ -114,7 +115,7 @@ func TestIterator(t *testing.T) {
// test the channel iteration
list = []string{}
iter, err = repo.NewReferenceIterator()
- for name := range iter.Iter() {
+ for name := range iter.NameIter() {
list = append(list, name)
}
@@ -128,7 +129,7 @@ func TestIterator(t *testing.T) {
}
list = []string{}
- for name := range iter.Iter() {
+ for name := range iter.NameIter() {
list = append(list, name)
}