Skip to content

Commit

Permalink
Fix TestSetTimeValue for Go 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcook committed Oct 5, 2022
1 parent 2cefdca commit 82e488a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func TestSetTimeValue(t *testing.T) {
t.Error(err)
}

if m.TimeVal.Sub(model.TimeVal).Abs() > time.Second {
if m.TimeVal.Before(model.TimeVal) || m.TimeVal.Sub(model.TimeVal) > time.Second {
t.Errorf("TestSetTimeValue FAILED, initial value was not set correctly")
}
}

0 comments on commit 82e488a

Please sign in to comment.