summaryrefslogtreecommitdiff
path: root/test/ruby/test_fixnum.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_fixnum.rb')
-rw-r--r--test/ruby/test_fixnum.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_fixnum.rb b/test/ruby/test_fixnum.rb
index 3a1c2fa8bc5..bd18067dda8 100644
--- a/test/ruby/test_fixnum.rb
+++ b/test/ruby/test_fixnum.rb
@@ -337,4 +337,16 @@ class TestFixnum < Test::Unit::TestCase
assert_not_predicate(0, :negative?)
assert_not_predicate(1, :negative?)
end
+
+ def test_finite_p
+ assert_predicate(1, :finite?)
+ assert_predicate(0, :finite?)
+ assert_predicate(-1, :finite?)
+ end
+
+ def test_infinite_p
+ assert_nil(1.infinite?)
+ assert_nil(0.infinite?)
+ assert_nil(-1.infinite?)
+ end
end