ruby-changes:45422
From: nobu <ko1@a...>
Date: Thu, 2 Feb 2017 14:44:03 +0900 (JST)
Subject: [ruby-changes:45422] nobu:r57495 (trunk): test_iseq_load.rb: refine test_require_integration
nobu 2017-02-02 14:43:58 +0900 (Thu, 02 Feb 2017) New Revision: 57495 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57495 Log: test_iseq_load.rb: refine test_require_integration * test/-ext-/iseq_load/test_iseq_load.rb (test_require_integration): assert with diff. [ci skip] Modified files: trunk/test/-ext-/iseq_load/test_iseq_load.rb Index: test/-ext-/iseq_load/test_iseq_load.rb =================================================================== --- test/-ext-/iseq_load/test_iseq_load.rb (revision 57494) +++ test/-ext-/iseq_load/test_iseq_load.rb (revision 57495) @@ -102,16 +102,16 @@ class TestIseqLoad < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/-ext-/iseq_load/test_iseq_load.rb#L102 f = File.expand_path(__FILE__) # $(top_srcdir)/test/ruby/test_....rb 3.times { f = File.dirname(f) } - Dir[File.join(f, 'ruby', '*.rb')].each do |f| - iseq = ISeq.compile_file(f) - orig = iseq.to_a.freeze + all_assertions do |all| + Dir[File.join(f, 'ruby', '*.rb')].each do |f| + all.for(f) do + iseq = ISeq.compile_file(f) + orig = iseq.to_a.freeze - loaded = ISeq.iseq_load(orig).to_a - if loaded != orig - warn f - warn diff(orig, loaded) + loaded = ISeq.iseq_load(orig).to_a + assert loaded == orig, proc {"ISeq unmatch:\n"+diff(orig, loaded)} + end end - #assert_equal orig, loaded end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/