ruby-changes:50966
From: mame <ko1@a...>
Date: Tue, 17 Apr 2018 17:19:13 +0900 (JST)
Subject: [ruby-changes:50966] mame:r63174 (trunk): Use assert(false) for the path that is expected unreachable
mame 2018-04-17 17:18:57 +0900 (Tue, 17 Apr 2018) New Revision: 63174 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63174 Log: Use assert(false) for the path that is expected unreachable Modified files: trunk/test/gdbm/test_gdbm.rb trunk/test/ruby/test_array.rb Index: test/ruby/test_array.rb =================================================================== --- test/ruby/test_array.rb (revision 63173) +++ test/ruby/test_array.rb (revision 63174) @@ -735,7 +735,7 @@ class TestArray < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_array.rb#L735 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_array.rb#L755 a = @cls[] i = 0 a.each_index { |ind| - assert_equal(i, ind) + assert(false, "Never get here") i += 1 } assert_equal(0, i) Index: test/gdbm/test_gdbm.rb =================================================================== --- test/gdbm/test_gdbm.rb (revision 63173) +++ test/gdbm/test_gdbm.rb (revision 63174) @@ -164,7 +164,7 @@ if defined? GDBM https://github.com/ruby/ruby/blob/trunk/test/gdbm/test_gdbm.rb#L164 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/