1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use Test::Unit::AssertionFailedError instead of MiniTest::Assertion for test-unit migration

This commit is contained in:
Hiroshi SHIBATA 2021-09-06 18:34:15 +09:00
parent 8baac078bc
commit 940a19e4b3
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
6 changed files with 7 additions and 7 deletions

View file

@ -50,7 +50,7 @@ class TestFloatExt < Test::Unit::TestCase
assert_equal(s1, s2,
"Bug::Float.missing_nextafter(#{'%a' % n1}, #{'%a' % n2}) = #{'%a' % v1} != " +
"#{'%a' % v2} = Bug::Float.system_nextafter(#{'%a' % n1}, #{'%a' % n2})")
rescue Minitest::Assertion
rescue Test::Unit::AssertionFailedError
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in nextafter(3) on AIX"
end

View file

@ -242,7 +242,7 @@ class TestFileUtils < Test::Unit::TestCase
#
def test_assert_output_lines
assert_raise(MiniTest::Assertion) {
assert_raise(Test::Unit::AssertionFailedError) {
Timeout.timeout(0.5) {
assert_output_lines([]) {
Thread.current.report_on_exception = false

View file

@ -577,7 +577,7 @@ end.join
end
end;
end
rescue Minitest::Assertion
rescue Test::Unit::AssertionFailedError
# Possibly compiled with -DRUBY_DEBUG, in which
# case rb_bug is used instead of NoMemoryError,
# and we cannot test ensure after NoMemoryError.

View file

@ -586,7 +586,7 @@ class TestSocketAddrinfo < Test::Unit::TestCase
ai = ipv6(addr)
begin
assert(ai.ipv4? || ai.send(meth), "ai=#{addr_exp}; ai.ipv4? || .#{meth}")
rescue Minitest::Assertion
rescue Test::Unit::AssertionFailedError
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in IN6_IS_ADDR_V4COMPAT and IN6_IS_ADDR_V4MAPPED on AIX"
end

View file

@ -32,7 +32,7 @@ class TestSocket_BasicSocket < Test::Unit::TestCase
n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
assert_equal([0].pack("i"), n.data)
rescue Minitest::Assertion
rescue Test::Unit::AssertionFailedError
s.close
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in getsockopt(2) on AIX"

View file

@ -1319,7 +1319,7 @@ if defined? Zlib
assert_equal(0x02820145, Zlib.adler32_combine(one, two, 1))
rescue NotImplementedError
skip "adler32_combine is not implemented"
rescue Minitest::Assertion
rescue Test::Unit::AssertionFailedError
if /aix/ =~ RUBY_PLATFORM
skip "zconf.h in zlib does not handle _LARGE_FILES in AIX. Skip until it is fixed"
end
@ -1354,7 +1354,7 @@ if defined? Zlib
assert_equal(0x8c736521, Zlib.crc32_combine(one, two, 1))
rescue NotImplementedError
skip "crc32_combine is not implemented"
rescue Minitest::Assertion
rescue Test::Unit::AssertionFailedError
if /aix/ =~ RUBY_PLATFORM
skip "zconf.h in zlib does not handle _LARGE_FILES in AIX. Skip until it is fixed"
end