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

Add test for marshal

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-10-08 08:54:35 +00:00
parent 68ec41d7b9
commit 62a3dbd539

View file

@ -542,4 +542,10 @@ class TestTimeTZ::WithTZ < Test::Unit::TestCase
assert_equal([2018, 9, 1, 13, 6, 40, tz], [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.zone])
assert_equal(Time.utc(2018, 9, 1, 4, 6, 40), t)
end
def test_marshal
t = Time.new(2018, 9, 1, 12, 0, 0, tz)
t2 = Marshal.load(Marshal.dump(t))
assert_equal(t, t2)
end
end