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:
parent
8baac078bc
commit
940a19e4b3
6 changed files with 7 additions and 7 deletions
|
@ -50,7 +50,7 @@ class TestFloatExt < Test::Unit::TestCase
|
||||||
assert_equal(s1, s2,
|
assert_equal(s1, s2,
|
||||||
"Bug::Float.missing_nextafter(#{'%a' % n1}, #{'%a' % n2}) = #{'%a' % v1} != " +
|
"Bug::Float.missing_nextafter(#{'%a' % n1}, #{'%a' % n2}) = #{'%a' % v1} != " +
|
||||||
"#{'%a' % v2} = Bug::Float.system_nextafter(#{'%a' % n1}, #{'%a' % n2})")
|
"#{'%a' % v2} = Bug::Float.system_nextafter(#{'%a' % n1}, #{'%a' % n2})")
|
||||||
rescue Minitest::Assertion
|
rescue Test::Unit::AssertionFailedError
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "Known bug in nextafter(3) on AIX"
|
skip "Known bug in nextafter(3) on AIX"
|
||||||
end
|
end
|
||||||
|
|
|
@ -242,7 +242,7 @@ class TestFileUtils < Test::Unit::TestCase
|
||||||
#
|
#
|
||||||
|
|
||||||
def test_assert_output_lines
|
def test_assert_output_lines
|
||||||
assert_raise(MiniTest::Assertion) {
|
assert_raise(Test::Unit::AssertionFailedError) {
|
||||||
Timeout.timeout(0.5) {
|
Timeout.timeout(0.5) {
|
||||||
assert_output_lines([]) {
|
assert_output_lines([]) {
|
||||||
Thread.current.report_on_exception = false
|
Thread.current.report_on_exception = false
|
||||||
|
|
|
@ -577,7 +577,7 @@ end.join
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
rescue Minitest::Assertion
|
rescue Test::Unit::AssertionFailedError
|
||||||
# Possibly compiled with -DRUBY_DEBUG, in which
|
# Possibly compiled with -DRUBY_DEBUG, in which
|
||||||
# case rb_bug is used instead of NoMemoryError,
|
# case rb_bug is used instead of NoMemoryError,
|
||||||
# and we cannot test ensure after NoMemoryError.
|
# and we cannot test ensure after NoMemoryError.
|
||||||
|
|
|
@ -586,7 +586,7 @@ class TestSocketAddrinfo < Test::Unit::TestCase
|
||||||
ai = ipv6(addr)
|
ai = ipv6(addr)
|
||||||
begin
|
begin
|
||||||
assert(ai.ipv4? || ai.send(meth), "ai=#{addr_exp}; ai.ipv4? || .#{meth}")
|
assert(ai.ipv4? || ai.send(meth), "ai=#{addr_exp}; ai.ipv4? || .#{meth}")
|
||||||
rescue Minitest::Assertion
|
rescue Test::Unit::AssertionFailedError
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "Known bug in IN6_IS_ADDR_V4COMPAT and IN6_IS_ADDR_V4MAPPED on AIX"
|
skip "Known bug in IN6_IS_ADDR_V4COMPAT and IN6_IS_ADDR_V4MAPPED on AIX"
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,7 +32,7 @@ class TestSocket_BasicSocket < Test::Unit::TestCase
|
||||||
|
|
||||||
n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
|
n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
|
||||||
assert_equal([0].pack("i"), n.data)
|
assert_equal([0].pack("i"), n.data)
|
||||||
rescue Minitest::Assertion
|
rescue Test::Unit::AssertionFailedError
|
||||||
s.close
|
s.close
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "Known bug in getsockopt(2) on AIX"
|
skip "Known bug in getsockopt(2) on AIX"
|
||||||
|
|
|
@ -1319,7 +1319,7 @@ if defined? Zlib
|
||||||
assert_equal(0x02820145, Zlib.adler32_combine(one, two, 1))
|
assert_equal(0x02820145, Zlib.adler32_combine(one, two, 1))
|
||||||
rescue NotImplementedError
|
rescue NotImplementedError
|
||||||
skip "adler32_combine is not implemented"
|
skip "adler32_combine is not implemented"
|
||||||
rescue Minitest::Assertion
|
rescue Test::Unit::AssertionFailedError
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "zconf.h in zlib does not handle _LARGE_FILES in AIX. Skip until it is fixed"
|
skip "zconf.h in zlib does not handle _LARGE_FILES in AIX. Skip until it is fixed"
|
||||||
end
|
end
|
||||||
|
@ -1354,7 +1354,7 @@ if defined? Zlib
|
||||||
assert_equal(0x8c736521, Zlib.crc32_combine(one, two, 1))
|
assert_equal(0x8c736521, Zlib.crc32_combine(one, two, 1))
|
||||||
rescue NotImplementedError
|
rescue NotImplementedError
|
||||||
skip "crc32_combine is not implemented"
|
skip "crc32_combine is not implemented"
|
||||||
rescue Minitest::Assertion
|
rescue Test::Unit::AssertionFailedError
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "zconf.h in zlib does not handle _LARGE_FILES in AIX. Skip until it is fixed"
|
skip "zconf.h in zlib does not handle _LARGE_FILES in AIX. Skip until it is fixed"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue