diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-14 13:52:25 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-14 13:52:25 +0000 |
commit | 614ec73fc8b5d949161c5b277e27719883d62981 (patch) | |
tree | e8c1d10196cb86540e4177961934f7167cb792a3 /test/date/test_switch_hitter.rb | |
parent | f2dbf38606ebd91fa9e1a31243a44b36fbf871ce (diff) | |
download | ruby-614ec73fc8b5d949161c5b277e27719883d62981.tar.gz |
* test/date/test_*.rb: added tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/date/test_switch_hitter.rb')
-rw-r--r-- | test/date/test_switch_hitter.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/date/test_switch_hitter.rb b/test/date/test_switch_hitter.rb index d4603a23df..5ec94fd8e1 100644 --- a/test/date/test_switch_hitter.rb +++ b/test/date/test_switch_hitter.rb @@ -348,11 +348,15 @@ class TestSH < Test::Unit::TestCase def test_marshal s = "\x04\bU:\tDate[\bU:\rRational[\ai\x03\xCF\xD3Ji\ai\x00o:\x13Date::Infinity\x06:\a@di\xFA" d = Marshal.load(s) - assert_equal(Date.new(2001,2,3,Date::GREGORIAN), d) + assert_equal(Rational(4903887,2), d.ajd) + assert_equal(Rational(0,24), d.send(:offset)) + assert_equal(Date::GREGORIAN, d.start) s = "\x04\bU:\rDateTime[\bU:\rRational[\al+\b\xC9\xB0\x81\xBD\x02\x00i\x02\xC0\x12U;\x06[\ai\bi\ro:\x13Date::Infinity\x06:\a@di\xFA" d = Marshal.load(s) - assert_equal(DateTime.new(2001,2,3,4,5,6,Rational(9,24),Date::GREGORIAN), d) + assert_equal(Rational(11769327817,4800), d.ajd) + assert_equal(Rational(9,24), d.offset) + assert_equal(Date::GREGORIAN, d.start) end def test_taint |