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

ruby-changes:50618

From: nobu <ko1@a...>
Date: Fri, 16 Mar 2018 21:07:01 +0900 (JST)
Subject: [ruby-changes:50618] nobu:r62776 (trunk): test_iseq.rb: skip iseq with coverage

nobu	2018-03-16 21:06:55 +0900 (Fri, 16 Mar 2018)

  New Revision: 62776

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

  Log:
    test_iseq.rb: skip iseq with coverage
    
    * test/ruby/test_iseq.rb (test_to_binary_with_objects): #to_binary
      does not support iseq compiled with coverage, just skip.

  Modified files:
    trunk/test/ruby/test_iseq.rb
Index: test/ruby/test_iseq.rb
===================================================================
--- test/ruby/test_iseq.rb	(revision 62775)
+++ test/ruby/test_iseq.rb	(revision 62776)
@@ -399,7 +399,12 @@ class TestISeq < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_iseq.rb#L399
   def test_to_binary_with_objects
     code = "[]"+100.times.map{|i|"<</#{i}/"}.join
     iseq = RubyVM::InstructionSequence.compile(code)
-    bin = assert_nothing_raised {iseq.to_binary}
+    bin = assert_nothing_raised do
+      iseq.to_binary
+    rescue RuntimeError => e
+      skip e.message if /compile with coverage/ =~ e.message
+      raise
+    end
     iseq2 = RubyVM::InstructionSequence.load_from_binary(bin)
     assert_equal(iseq2.to_a, iseq.to_a)
   end

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

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