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

don't use a string for Time.at argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-07-02 11:04:11 +00:00
parent 00f5982e97
commit 6897fddd65

View file

@ -109,21 +109,21 @@ class TestTime < Test::Unit::TestCase
end end
def test_at def test_at
assert_equal(100000, Time.at("0.1").usec) assert_equal(100000, Time.at("0.1".to_r).usec)
assert_equal(10000, Time.at("0.01").usec) assert_equal(10000, Time.at("0.01".to_r).usec)
assert_equal(1000, Time.at("0.001").usec) assert_equal(1000, Time.at("0.001".to_r).usec)
assert_equal(100, Time.at("0.0001").usec) assert_equal(100, Time.at("0.0001".to_r).usec)
assert_equal(10, Time.at("0.00001").usec) assert_equal(10, Time.at("0.00001".to_r).usec)
assert_equal(1, Time.at("0.000001").usec) assert_equal(1, Time.at("0.000001".to_r).usec)
assert_equal(100000000, Time.at("0.1").nsec) assert_equal(100000000, Time.at("0.1".to_r).nsec)
assert_equal(10000000, Time.at("0.01").nsec) assert_equal(10000000, Time.at("0.01".to_r).nsec)
assert_equal(1000000, Time.at("0.001").nsec) assert_equal(1000000, Time.at("0.001".to_r).nsec)
assert_equal(100000, Time.at("0.0001").nsec) assert_equal(100000, Time.at("0.0001".to_r).nsec)
assert_equal(10000, Time.at("0.00001").nsec) assert_equal(10000, Time.at("0.00001".to_r).nsec)
assert_equal(1000, Time.at("0.000001").nsec) assert_equal(1000, Time.at("0.000001".to_r).nsec)
assert_equal(100, Time.at("0.0000001").nsec) assert_equal(100, Time.at("0.0000001".to_r).nsec)
assert_equal(10, Time.at("0.00000001").nsec) assert_equal(10, Time.at("0.00000001".to_r).nsec)
assert_equal(1, Time.at("0.000000001").nsec) assert_equal(1, Time.at("0.000000001".to_r).nsec)
assert_equal(100000, Time.at(0.1).usec) assert_equal(100000, Time.at(0.1).usec)
assert_equal(10000, Time.at(0.01).usec) assert_equal(10000, Time.at(0.01).usec)
assert_equal(1000, Time.at(0.001).usec) assert_equal(1000, Time.at(0.001).usec)