ruby-changes:4735
From: ko1@a...
Date: Mon, 28 Apr 2008 14:45:46 +0900 (JST)
Subject: [ruby-changes:4735] akr - Ruby:r16229 (trunk): more tests.
akr 2008-04-28 14:45:37 +0900 (Mon, 28 Apr 2008)
New Revision: 16229
Modified files:
trunk/test/ruby/test_float.rb
Log:
more tests.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_float.rb?r1=16229&r2=16228&diff_format=u
Index: test/ruby/test_float.rb
===================================================================
--- test/ruby/test_float.rb (revision 16228)
+++ test/ruby/test_float.rb (revision 16229)
@@ -355,6 +355,9 @@
assert_operator(i, :>, 0)
end
assert_operator(i.abs, :<=, f.abs)
+ d = f.abs - i.abs
+ assert_operator(0, :<=, d)
+ assert_operator(d, :<, 1)
}
end
@@ -367,6 +370,9 @@
assert_operator(i, :>, 0)
end
assert_operator(i, :>=, f)
+ d = f - i
+ assert_operator(-1, :<, d)
+ assert_operator(d, :<=, 0)
}
end
@@ -379,6 +385,9 @@
assert_operator(i, :>, 0)
end
assert_operator(i, :<=, f)
+ d = f - i
+ assert_operator(0, :<=, d)
+ assert_operator(d, :<, 1)
}
end
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/