Fix time duration comparison in ToTime test to ensure correct validation of generated timestamps. (#76)

This commit is contained in:
Yoshiyuki Mineo
2025-06-23 21:45:29 +09:00
committed by GitHub
parent 2343cac676
commit 114716564a

View File

@@ -366,7 +366,7 @@ func TestToTime(t *testing.T) {
tm := sf.ToTime(id)
diff := tm.Sub(start)
if diff < 0 || diff >= time.Duration(sf.timeUnit) {
if diff < 0 || diff > time.Duration(sf.timeUnit) {
t.Errorf("unexpected time: %v", tm)
}
}