diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-11 00:07:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-11 00:07:16 +0000 |
commit | cdb62cc15f6b8a9106e3dc3af9d79b95e76f6cd7 (patch) | |
tree | 0f6d78a0ca9c55bcbec0f92923ac8aa54bfc4a1f /test | |
parent | c5487f08b75ce31ce8673a56d6a12c5e0076befb (diff) | |
download | ruby-cdb62cc15f6b8a9106e3dc3af9d79b95e76f6cd7.tar.gz |
time/test_new.rb: fix tests
* test/-ext-/time/test_new.rb (test_timespec_new): fix for r52519.
swap utc and localtime.
* test/-ext-/time/test_new.rb (test_timespec_now): fix method name
typo which has overwritten test_timespec_new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/time/test_new.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/-ext-/time/test_new.rb b/test/-ext-/time/test_new.rb index b25bdf6bd2..5ccf6f0a5d 100644 --- a/test/-ext-/time/test_new.rb +++ b/test/-ext-/time/test_new.rb @@ -20,9 +20,9 @@ class Bug::Time::Test_New < Test::Unit::TestCase assert_not_equal(Time.at(1447087832, 476451.128).localtime(32400), Bug::Time.timespec_new(1447087832, 476451125, 32400)) assert_equal(false, Bug::Time.timespec_new(1447087832, 476451125, 0).utc?) - assert_equal(true, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).utc?) - assert_equal(false, Bug::Time.timespec_new(1447087832, 476451125, 0x7ffffffe).utc?) - assert_equal(Time.now.gmtoff, Bug::Time.timespec_new(1447087832, 476451125, 0x7ffffffe).gmtoff) + assert_equal(true, Bug::Time.timespec_new(1447087832, 476451125, 0x7ffffffe).utc?) + assert_equal(false, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).utc?) + assert_equal(Time.now.gmtoff, Bug::Time.timespec_new(1447087832, 476451125, 0x7fffffff).gmtoff) assert_time_equal(Time.at(1447087832, 476451.125).localtime(86399), Bug::Time.timespec_new(1447087832, 476451125, 86399)) assert_time_equal(Time.at(1447087832, 476451.125).localtime(-86399), @@ -31,7 +31,7 @@ class Bug::Time::Test_New < Test::Unit::TestCase assert_raise(ArgumentError){Bug::Time.timespec_new(1447087832, 476451125,-86400)} end - def test_timespec_new + def test_timespec_now t0 = Time.now.to_r t = Bug::Time.timespec_now assert_in_delta 3, t0, t |