diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-13 14:29:21 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-13 14:29:21 +0000 |
commit | f0d20684d2d73c00ec71ba0084dee37c12e20f0c (patch) | |
tree | 5455194b8a7cd0509edc6cdde94e5b39308d5cc2 /test/-ext- | |
parent | 0381ec5164c12a20bf5889c18b3a5d94ad7af623 (diff) | |
download | ruby-f0d20684d2d73c00ec71ba0084dee37c12e20f0c.tar.gz |
Add some tests for *method_defined?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/test_notimplement.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/-ext-/test_notimplement.rb b/test/-ext-/test_notimplement.rb index 73a9077b9c..882c905faf 100644 --- a/test/-ext-/test_notimplement.rb +++ b/test/-ext-/test_notimplement.rb @@ -15,5 +15,19 @@ class Test_NotImplement < Test::Unit::TestCase def test_not_method_defined assert !Bug::NotImplement.method_defined?(:notimplement) + assert !Bug::NotImplement.method_defined?(:notimplement, true) + assert !Bug::NotImplement.method_defined?(:notimplement, false) + end + + def test_not_private_method_defined + assert !Bug::NotImplement.private_method_defined?(:notimplement) + assert !Bug::NotImplement.private_method_defined?(:notimplement, true) + assert !Bug::NotImplement.private_method_defined?(:notimplement, false) + end + + def test_not_protected_method_defined + assert !Bug::NotImplement.protected_method_defined?(:notimplement) + assert !Bug::NotImplement.protected_method_defined?(:notimplement, true) + assert !Bug::NotImplement.protected_method_defined?(:notimplement, false) end end |