[前][次][番号順一覧][スレッド一覧]

ruby-changes:52137

From: usa <ko1@a...>
Date: Mon, 13 Aug 2018 23:29:26 +0900 (JST)
Subject: [ruby-changes:52137] usa:r64345 (trunk): Add some tests for *method_defined?

usa	2018-08-13 23:29:21 +0900 (Mon, 13 Aug 2018)

  New Revision: 64345

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64345

  Log:
    Add some tests for *method_defined?

  Modified files:
    trunk/test/-ext-/test_notimplement.rb
Index: test/-ext-/test_notimplement.rb
===================================================================
--- test/-ext-/test_notimplement.rb	(revision 64344)
+++ test/-ext-/test_notimplement.rb	(revision 64345)
@@ -15,5 +15,19 @@ class Test_NotImplement < Test::Unit::Te https://github.com/ruby/ruby/blob/trunk/test/-ext-/test_notimplement.rb#L15
 
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]