From 55f0fa5a7a97fea1a41f5e56c8cd50dea0cb73f9 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 5 Feb 2013 04:45:23 +0000 Subject: test_range.rb: refine message * test/ruby/test_range.rb (TestRange#test_bsearch_with_mathn): refine failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_range.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/ruby') diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index 0eb25480be..e12e8fc438 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -538,6 +538,13 @@ class TestRange < Test::Unit::TestCase 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 -- cgit v1.2.3