Fixed crash in iterator Clone(), added test
This commit is contained in:
parent
a5aca090c1
commit
1ddc94c2e5
2 changed files with 14 additions and 1 deletions
|
|
@ -254,6 +254,16 @@ func TestIterators(t *testing.T) {
|
|||
if !it.Contains(token) {
|
||||
t.Error("Contains failed")
|
||||
}
|
||||
|
||||
// Test cloning an iterator
|
||||
var it2 graph.Iterator
|
||||
it2 = it.Clone()
|
||||
x := it2.Describe()
|
||||
y := it.Describe()
|
||||
|
||||
if x.Name != y.Name {
|
||||
t.Errorf("Iterator Clone was not successful got: %v, expected: %v", x.Name, y.Name)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIteratorsAndNextResultOrderA(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue