summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorCarson McDonald <[email protected]>2013-12-31 14:47:17 -0500
committerCarson McDonald <[email protected]>2013-12-31 14:47:17 -0500
commit3911a052a6bb591a4a8cebb09efef2661dccb2ed (patch)
treedbbd915f4f7deb0affd31db34c812b01e0e0cebf /test
parentca642dd3ef5c654f737ea6553d1ed9476acb172e (diff)
downloadmruby-3911a052a6bb591a4a8cebb09efef2661dccb2ed.tar.gz
mruby-3911a052a6bb591a4a8cebb09efef2661dccb2ed.zip
More object_id test coverage
Diffstat (limited to 'test')
-rw-r--r--test/t/kernel.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/t/kernel.rb b/test/t/kernel.rb
index 3e802b219..7250cc118 100644
--- a/test/t/kernel.rb
+++ b/test/t/kernel.rb
@@ -334,7 +334,18 @@ assert('Kernel#nil?', '15.3.1.3.32') do
end
assert('Kernel#object_id', '15.3.1.3.33') do
- assert_equal Fixnum, object_id.class
+ a = ""
+ b = ""
+ assert_not_equal a.object_id, b.object_id
+
+ assert_kind_of Fixnum, object_id
+ assert_kind_of Fixnum, "".object_id
+ assert_kind_of Fixnum, true.object_id
+ assert_kind_of Fixnum, false.object_id
+ assert_kind_of Fixnum, nil.object_id
+ assert_kind_of Fixnum, :no.object_id
+ assert_kind_of Fixnum, 1.object_id
+ assert_kind_of Fixnum, 1.0.object_id
end
# Kernel#p is defined in mruby-print mrbgem. '15.3.1.3.34'