ruby-changes:49050
From: yui-knk <ko1@a...>
Date: Tue, 12 Dec 2017 22:19:44 +0900 (JST)
Subject: [ruby-changes:49050] yui-knk:r61165 (trunk): ext/coverage/coverage.c: Add test cases
yui-knk 2017-12-12 22:19:40 +0900 (Tue, 12 Dec 2017) New Revision: 61165 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61165 Log: ext/coverage/coverage.c: Add test cases * ext/coverage/coverage.c (test_method_coverage_for_define_method): Add test cases for method coverages which test do-end block define_method. Modified files: trunk/test/coverage/test_coverage.rb Index: test/coverage/test_coverage.rb =================================================================== --- test/coverage/test_coverage.rb (revision 61164) +++ test/coverage/test_coverage.rb (revision 61165) @@ -359,6 +359,8 @@ class TestCoverage < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/coverage/test_coverage.rb#L359 def test_method_coverage_for_define_method result = { :methods => { + [Object, :a, 6, 18, 6, 25] => 2, + [Object, :b, 7, 18, 8, 3] => 0, [Object, :bar, 2, 20, 3, 1] => 1, [Object, :baz, 4, 9, 4, 11] => 0, [Object, :foo, 1, 20, 1, 22] => 2, @@ -370,10 +372,15 @@ class TestCoverage < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/coverage/test_coverage.rb#L372 } f = proc {} define_method(:baz, &f) + define_method(:a) do; end + define_method(:b) do + end foo foo bar + a + a end; end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/