|
|
|
@ -265,10 +265,10 @@ func TestSetIteratorPrev(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestSetIteratorBegin(t *testing.T) {
|
|
|
|
|
m := NewWithStringComparator()
|
|
|
|
|
it := m.Iterator()
|
|
|
|
|
set := NewWithStringComparator()
|
|
|
|
|
it := set.Iterator()
|
|
|
|
|
it.Begin()
|
|
|
|
|
m.Add("a", "b", "c")
|
|
|
|
|
set.Add("a", "b", "c")
|
|
|
|
|
for it.Next() {
|
|
|
|
|
}
|
|
|
|
|
it.Begin()
|
|
|
|
@ -322,8 +322,8 @@ func TestSetIteratorLast(t *testing.T) {
|
|
|
|
|
if actualValue, expectedValue := it.Last(), true; actualValue != expectedValue {
|
|
|
|
|
t.Errorf("Got %v expected %v", actualValue, expectedValue)
|
|
|
|
|
}
|
|
|
|
|
if index, value := it.Index(), it.Value(); index != 3 || value != "c" {
|
|
|
|
|
t.Errorf("Got %v,%v expected %v,%v", index, value, 3, "c")
|
|
|
|
|
if index, value := it.Index(), it.Value(); index != 2 || value != "c" {
|
|
|
|
|
t.Errorf("Got %v,%v expected %v,%v", index, value, 2, "c")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|