ruby-changes:27009
From: nobu <ko1@a...>
Date: Tue, 5 Feb 2013 13:45:33 +0900 (JST)
Subject: [ruby-changes:27009] nobu:r39061 (trunk): test_range.rb: refine message
nobu 2013-02-05 13:45:23 +0900 (Tue, 05 Feb 2013) New Revision: 39061 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39061 Log: test_range.rb: refine message * test/ruby/test_range.rb (TestRange#test_bsearch_with_mathn): refine failure messages. Modified files: trunk/test/ruby/test_range.rb Index: test/ruby/test_range.rb =================================================================== --- test/ruby/test_range.rb (revision 39060) +++ test/ruby/test_range.rb (revision 39061) @@ -538,6 +538,13 @@ class TestRange < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_range.rb#L538 end def test_bsearch_with_mathn - assert_in_out_err ['-r', 'mathn', '-e', 'puts (1..(1<<100)).bsearch{|x| raise "#{x} should be integer" unless x.integer?; x >= 42}'], "", ["42"], [], '[ruby-core:25740]' + assert_separately ['-r', 'mathn'], %q{ + msg = '[ruby-core:25740]' + answer = (1..(1 << 100)).bsearch{|x| + assert_predicate(x, :integer?, msg) + x >= 42 + } + assert_equal(42, answer, msg) + } end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/