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

Use assert(false) for the path that is expected unreachable

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-04-17 08:18:57 +00:00
parent c80339d05f
commit 91596bb719
2 changed files with 3 additions and 3 deletions

View file

@ -164,7 +164,7 @@ if defined? GDBM
open_db_child(dbname) do
assert_raise(Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::EACCES) {
GDBM.open(dbname, 0644) {|gdbm|
assert_instance_of(GDBM, gdbm)
assert(false)
}
}
end

View file

@ -735,7 +735,7 @@ class TestArray < Test::Unit::TestCase
a = @cls[]
i = 0
a.each { |e|
assert_equal(a[i], e)
assert(false, "Never get here")
i += 1
}
assert_equal(0, i)
@ -755,7 +755,7 @@ class TestArray < Test::Unit::TestCase
a = @cls[]
i = 0
a.each_index { |ind|
assert_equal(i, ind)
assert(false, "Never get here")
i += 1
}
assert_equal(0, i)