diff --git a/iter_test.go b/iter_test.go index 2212923..a160b84 100644 --- a/iter_test.go +++ b/iter_test.go @@ -390,14 +390,13 @@ func TestBoundedIterFuncWithNoBoundsReturned(t *testing.T) { if err != nil { t.Fatal(err) } - - if err := sm.BoundedIterFunc(false, time.Now().Add(-1*time.Microsecond), time.Now(), func(rec Record) bool { + if err := sm.BoundedIterFunc(false, time.Date(5783, 1, 1, 0, 0, 0, 0, time.UTC), time.Now(), func(rec Record) bool { if rec.Key == nil { - t.Fatalf("TestBoundedIterFunc failed: %v", nilValErr) + t.Fatal(nilValErr) } return false - }); err != nil { - t.Fatal(err) + }); err == nil { + t.Fatal("Values fall between or are equal to the given bounds when it should not have returned bounds.") } } diff --git a/keys_test.go b/keys_test.go index 1578796..4bdd37c 100644 --- a/keys_test.go +++ b/keys_test.go @@ -49,7 +49,7 @@ func TestBoundedKeysWithNoBoundsReturned(t *testing.T) { if err != nil { t.Fatal(err) } - if _, err := sm.BoundedKeys(time.Now().Add(-1*time.Microsecond), time.Now()); err != nil { - t.Fatal(err) + if val, err := sm.BoundedKeys(time.Date(5783, 1, 1, 0, 0, 0, 0, time.UTC), time.Now()); err == nil { + t.Fatalf("Values fall between or are equal to the given bounds when it should not have returned bounds: %+v", sm.idx[val[0]]) } }