1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Relaxed delta of nanosec from Float time

This commit is contained in:
Nobuyoshi Nakada 2019-07-13 09:48:12 +09:00
parent 331eccf3fe
commit e2bee86dc4
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -173,7 +173,7 @@ class TestTime < Test::Unit::TestCase
assert_equal(10000, Time.at(0.00001).nsec)
assert_equal(3000, Time.at(0.000003).nsec)
assert_equal(200, Time.at(0.0000002r).nsec)
assert_equal(199, Time.at(0.0000002).nsec)
assert_in_delta(200, Time.at(0.0000002).nsec, 1, "should be within FP error")
assert_equal(10, Time.at(0.00000001).nsec)
assert_equal(1, Time.at(0.000000001).nsec)