mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bootstraptest/runner.rb (assert_equal): add additional
message parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ab664381aa
commit
2829c72cce
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Aug 6 14:29:30 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* bootstraptest/runner.rb (assert_equal): add additional
|
||||||
|
message parameter.
|
||||||
|
|
||||||
Mon Aug 6 13:34:09 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Aug 6 13:34:09 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (INSNS): not chdir to srcdir.
|
* common.mk (INSNS): not chdir to srcdir.
|
||||||
|
|
|
@ -95,7 +95,7 @@ def exec_test(pathes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_equal(expected, testsrc)
|
def assert_equal(expected, testsrc, message = '')
|
||||||
newtest
|
newtest
|
||||||
$stderr.puts "\##{@count} #{@location}" if @verbose
|
$stderr.puts "\##{@count} #{@location}" if @verbose
|
||||||
result = get_result_string(testsrc)
|
result = get_result_string(testsrc)
|
||||||
|
@ -104,11 +104,11 @@ def assert_equal(expected, testsrc)
|
||||||
$stderr.print '.'
|
$stderr.print '.'
|
||||||
else
|
else
|
||||||
$stderr.print 'F'
|
$stderr.print 'F'
|
||||||
error pretty(testsrc, expected, result)
|
error pretty(testsrc, expected, result), message
|
||||||
end
|
end
|
||||||
rescue Exception => err
|
rescue Exception => err
|
||||||
$stderr.print 'E'
|
$stderr.print 'E'
|
||||||
error err.message
|
error err.message, message
|
||||||
end
|
end
|
||||||
|
|
||||||
def pretty(src, ex, result)
|
def pretty(src, ex, result)
|
||||||
|
@ -147,8 +147,8 @@ def newtest
|
||||||
cleanup_coredump
|
cleanup_coredump
|
||||||
end
|
end
|
||||||
|
|
||||||
def error(msg)
|
def error(msg, additional_message)
|
||||||
@errbuf.push "\##{@count} #{@location}: #{msg}"
|
@errbuf.push "\##{@count} #{@location}: #{msg} #{additional_message}"
|
||||||
@error += 1
|
@error += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue