summaryrefslogtreecommitdiff
path: root/test/-ext-/num2int
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-01 21:49:55 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-01 21:49:55 +0000
commitd40335aa36a0acbe85dde987deaeac6eb0a27e40 (patch)
treee0ac7b76169d571da765e45652d413d2767e825f /test/-ext-/num2int
parent7d3db3cc8187e57ab8801051189f81cb8ff9d3c3 (diff)
* ext/-test-/num2int/num2int.c: Rename utility methods
to global functions to ease manual experiments. * test/-ext-/num2int/test_num2int.rb: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/num2int')
-rw-r--r--test/-ext-/num2int/test_num2int.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/-ext-/num2int/test_num2int.rb b/test/-ext-/num2int/test_num2int.rb
index f421ae0..6c2edc6 100644
--- a/test/-ext-/num2int/test_num2int.rb
+++ b/test/-ext-/num2int/test_num2int.rb
@@ -37,10 +37,9 @@ class TestNum2int < Test::Unit::TestCase
def assert_num2i_success_internal(exp, func, arg)
mesg = "#{func}(#{arg.inspect})"
- method = "rb_#{func}".downcase
out = nil
assert_nothing_raised(mesg) {
- out = Num2int.send(method, arg)
+ out = Kernel.send(func, arg)
}
assert_equal(exp, out, mesg)
end
@@ -64,9 +63,8 @@ class TestNum2int < Test::Unit::TestCase
end
def assert_num2i_error_internal(func, arg)
- method = "rb_#{func}".downcase
assert_raise(RangeError, "#{func}(#{arg.inspect})") {
- Num2int.send(method, arg)
+ Kernel.send(func, arg)
}
end
@@ -90,10 +88,9 @@ class TestNum2int < Test::Unit::TestCase
def assert_fix2i_success_internal(exp, func, arg)
mesg = "#{func}(#{arg.inspect})"
- method = "rb_#{func}".downcase
out = nil
assert_nothing_raised(mesg) {
- out = Num2int.send(method, arg)
+ out = Kernel.send(func, arg)
}
assert_equal(exp, out, mesg)
end
@@ -105,9 +102,8 @@ class TestNum2int < Test::Unit::TestCase
end
def assert_fix2i_error_internal(func, arg)
- method = "rb_#{func}".downcase
assert_raise(RangeError, "#{func}(#{arg.inspect})") {
- Num2int.send(method, arg)
+ Kernel.send(func, arg)
}
end