1
0
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:
Delyan Angelov 2022-08-20 13:56:10 +03:00
parent 499ab9bedb
commit c3568823ee
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -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
}