diff options
Diffstat (limited to 'tool/lib/core_assertions.rb')
-rw-r--r-- | tool/lib/core_assertions.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index f94a5dff66..8800487971 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -103,7 +103,7 @@ module Test pend 'assert_no_memory_leak may consider MJIT memory usage as leak' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? require_relative 'memory_status' - raise Test::Skip, "unsupported platform" unless defined?(Memory::Status) + raise Test::Unit::PendedError, "unsupported platform" unless defined?(Memory::Status) token = "\e[7;1m#{$$.to_s}:#{Time.now.strftime('%s.%L')}:#{rand(0x10000).to_s(16)}:\e[m" token_dump = token.dump @@ -168,11 +168,11 @@ module Test end begin line = __LINE__; yield - rescue Test::Skip + rescue Test::Unit::PendedError raise rescue Exception => e bt = e.backtrace - as = e.instance_of?(Test::Assertion) + as = e.instance_of?(Test::Unit::AssertionFailedError) if as ans = /\A#{Regexp.quote(__FILE__)}:#{line}:in /o bt.reject! {|ln| ans =~ ln} @@ -184,7 +184,7 @@ module Test "Backtrace:\n" + e.backtrace.map{|frame| " #{frame}"}.join("\n") } - raise Test::Assertion, msg.call, bt + raise Test::Unit::AssertionFailedError, msg.call, bt else raise end @@ -387,8 +387,8 @@ eom begin yield - rescue Test::Skip => e - return e if exp.include? Test::Skip + rescue Test::Unit::PendedError => e + return e if exp.include? Test::Unit::PendedError raise e rescue Exception => e expected = exp.any? { |ex| @@ -699,7 +699,7 @@ eom if message msg = "#{message}\n#{msg}" end - raise Test::Assertion, msg + raise Test::Unit::AssertionFailedError, msg end end |