mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
(test_time_now_cycle): cut off under micro second.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7ff702406a
commit
bd741ee16a
1 changed files with 1 additions and 8 deletions
|
@ -34,14 +34,6 @@ class YAML_Unit_Tests < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def assert_cycle( obj )
|
||||
if Time === obj
|
||||
x = YAML::load( obj.to_yaml )
|
||||
y = obj
|
||||
STDERR.puts [y.tv_sec, y.tv_usec, y.tv_nsec].inspect
|
||||
STDERR.puts [x.tv_sec, x.tv_usec, x.tv_nsec].inspect
|
||||
STDERR.puts [obj.<=>(x)]
|
||||
STDERR.puts [obj.eql?(x)].inspect
|
||||
end
|
||||
assert_equal( obj, YAML::load( obj.to_yaml ) )
|
||||
end
|
||||
|
||||
|
@ -1198,6 +1190,7 @@ EOY
|
|||
#
|
||||
require 'yaml'
|
||||
t = Time.now
|
||||
t = Time.at(t.tv_sec, t.tv_usec)
|
||||
5.times do
|
||||
assert_cycle(t)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue