Skip to content

Commit

Permalink
Add more testing conditions to BoundedIterFunc tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
umpc committed Jul 4, 2017
1 parent ac52001 commit c43e372
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion iter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,12 @@ func TestTestBoundedIterFuncWithNoBoundsReturned(t *testing.T) {
t.Fatal(err)
}

if _, err := sm.BoundedKeys(time.Now().Add(-1*time.Microsecond), time.Now()); err == nil {
if err := sm.BoundedIterFunc(false, time.Now().Add(-1*time.Microsecond), time.Now(), func(rec Record) bool {
if rec.Key == nil {
t.Fatalf("TestBoundedIterFunc failed: %v", nilValErr)
}
return false
}); err == nil {
t.Fatal("Values fall between or are equal to the given bounds when it should not have returned bounds.")
}
}
Expand Down

0 comments on commit c43e372

Please sign in to comment.