summaryrefslogtreecommitdiff
path: root/test/-ext-/num2int
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-02 10:26:02 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-02 10:26:02 +0000
commit6d0c59f156da08a6a669a3187f86b424ce147626 (patch)
tree9134fb42fbe26074cc00aa3083e57cd1dd65a664 /test/-ext-/num2int
parent817a96a45d686571c97892aa7c0b287539a5ecbd (diff)
* ext/-test-/num2int/num2int.c: Define utility methods
as module methods of Num2int. * test/-ext-/num2int/test_num2int.rb: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/num2int')
-rw-r--r--test/-ext-/num2int/test_num2int.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/-ext-/num2int/test_num2int.rb b/test/-ext-/num2int/test_num2int.rb
index f59c64c..a752900 100644
--- a/test/-ext-/num2int/test_num2int.rb
+++ b/test/-ext-/num2int/test_num2int.rb
@@ -36,7 +36,7 @@ class TestNum2int < Test::Unit::TestCase
mesg = "#{func}(#{arg.inspect})"
out = nil
assert_nothing_raised(mesg) {
- out = Kernel.send(func, arg)
+ out = Num2int.send(func, arg)
}
assert_equal(exp, out, mesg)
end
@@ -66,7 +66,7 @@ class TestNum2int < Test::Unit::TestCase
def assert_num2i_error_internal(func, arg)
assert_raise(RangeError, "#{func}(#{arg.inspect})") {
- Kernel.send(func, arg)
+ Num2int.send(func, arg)
}
end
@@ -97,7 +97,7 @@ class TestNum2int < Test::Unit::TestCase
mesg = "#{func}(#{arg.inspect})"
out = nil
assert_nothing_raised(mesg) {
- out = Kernel.send(func, arg)
+ out = Num2int.send(func, arg)
}
assert_equal(exp, out, mesg)
end
@@ -110,7 +110,7 @@ class TestNum2int < Test::Unit::TestCase
def assert_fix2i_error_internal(func, arg)
assert_raise(RangeError, "#{func}(#{arg.inspect})") {
- Kernel.send(func, arg)
+ Num2int.send(func, arg)
}
end
@@ -185,7 +185,7 @@ class TestNum2int < Test::Unit::TestCase
assert_num2i_success(:ll, FIXNUM_MIN-1)
assert_num2i_success(:ll, FIXNUM_MAX)
assert_num2i_success(:ll, FIXNUM_MAX+1)
- end if defined?(Kernel.NUM2LL)
+ end if defined?(Num2int.NUM2LL)
def test_num2ull
assert_num2i_success(:ull, 0)
@@ -198,7 +198,7 @@ class TestNum2int < Test::Unit::TestCase
assert_num2i_success(:ull, FIXNUM_MIN-1, ULLONG_MAX-FIXNUM_MAX-1)
assert_num2i_success(:ull, FIXNUM_MAX)
assert_num2i_success(:ull, FIXNUM_MAX+1)
- end if defined?(Kernel.NUM2ULL)
+ end if defined?(Num2int.NUM2ULL)
def test_fix2short
assert_fix2i_success(:short, 0)