mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: make vlib/time/private_test.v more robust/tolerant to small fluctuations
This commit is contained in:
parent
499ab9bedb
commit
c3568823ee
@ -10,5 +10,5 @@ fn test_new_is_same_as_old_for_all_platforms() {
|
||||
diff := new_time.unix - old_time.unix
|
||||
// could in very rare cases be that the second changed between calls
|
||||
dump(diff)
|
||||
assert (diff >= 0 && diff <= 2) == true
|
||||
assert (diff >= -2 && diff <= 2) == true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user