mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* same as the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5b21dbe956
commit
d833e3db01
2 changed files with 3 additions and 3 deletions
|
@ -203,7 +203,7 @@ class TestIterator < Test::Unit::TestCase
|
||||||
def test_proc
|
def test_proc
|
||||||
assert_instance_of(Proc, lambda{})
|
assert_instance_of(Proc, lambda{})
|
||||||
assert_instance_of(Proc, Proc.new{})
|
assert_instance_of(Proc, Proc.new{})
|
||||||
lambda{|a|assert(a==1)}.call(1)
|
lambda{|a|assert_equal(a, 1)}.call(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_block
|
def test_block
|
||||||
|
|
|
@ -18,9 +18,9 @@ class TestMarshal < Test::Unit::TestCase
|
||||||
def test_marshal
|
def test_marshal
|
||||||
$x = [1,2,3,[4,5,"foo"],{1=>"bar"},2.5,fact(30)]
|
$x = [1,2,3,[4,5,"foo"],{1=>"bar"},2.5,fact(30)]
|
||||||
$y = Marshal.dump($x)
|
$y = Marshal.dump($x)
|
||||||
assert($x == Marshal.load($y))
|
assert_equal($x, Marshal.load($y))
|
||||||
|
|
||||||
assert(Marshal.load(Marshal.dump(StrClone.new("abc"))).class == StrClone)
|
assert_equal(Marshal.load(Marshal.dump(StrClone.new("abc"))).class, StrClone)
|
||||||
|
|
||||||
[[1,2,3,4], [81, 2, 118, 3146]].each { |w,x,y,z|
|
[[1,2,3,4], [81, 2, 118, 3146]].each { |w,x,y,z|
|
||||||
a = (x.to_f + y.to_f / z.to_f) * Math.exp(w.to_f / (x.to_f + y.to_f / z.to_f))
|
a = (x.to_f + y.to_f / z.to_f) * Math.exp(w.to_f / (x.to_f + y.to_f / z.to_f))
|
||||||
|
|
Loading…
Add table
Reference in a new issue