Skip to content

Commit

Permalink
Iterator: Added IteratorStop test
Browse files Browse the repository at this point in the history
  • Loading branch information
seoester committed Jun 1, 2016
1 parent 1a9cd34 commit 358bdfb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,21 @@ func Test_UnsafeIterator(t *testing.T) {
}
}

func Test_IteratorStop(t *testing.T) {
a := NewSet()

a.Add("Z")
a.Add("Y")
a.Add("X")
a.Add("W")

it := a.Iterator()
it.Stop()
for _ = range it.C {
t.Error("The iterating (Iterator) did not stop after Stop() has been called")
}
}

func Test_PowerSet(t *testing.T) {
a := NewThreadUnsafeSet()

Expand Down

0 comments on commit 358bdfb

Please sign in to comment.