summaryrefslogtreecommitdiff
path: root/test/lib/-test-/integer.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-22 07:27:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-22 07:27:02 +0000
commit006634b4891fdf274bfa212ed74e696280a5d2dd (patch)
treea9993326ab7c38cff3827792b6d50a3c1a6d164a /test/lib/-test-/integer.rb
parent78c5ca70744e85f8468147ddc362962bcd987d30 (diff)
-test-/integer
* ext/-test-/integer/core_ext.c: move testutil/integer.c. * test/lib/-test-/integer.rb: extract implementation details from test/unit/assertions.rb. [Bug #12408] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/-test-/integer.rb')
-rw-r--r--test/lib/-test-/integer.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lib/-test-/integer.rb b/test/lib/-test-/integer.rb
new file mode 100644
index 0000000000..a224148f24
--- /dev/null
+++ b/test/lib/-test-/integer.rb
@@ -0,0 +1,14 @@
+require 'test/unit'
+require '-test-/integer.so'
+
+module Test::Unit::Assertions
+ def assert_fixnum(v, msg=nil)
+ assert_instance_of(Integer, v, msg)
+ assert_predicate(v, :fixnum?, msg)
+ end
+
+ def assert_bignum(v, msg=nil)
+ assert_instance_of(Integer, v, msg)
+ assert_predicate(v, :bignum?, msg)
+ end
+end