зеркало из https://github.com/github/ruby.git
* test/ruby/test_iterator.rb: new test test_break__nested_loop[123].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8f52e49124
Коммит
2eeb39b3cf
|
@ -1,3 +1,8 @@
|
|||
Tue Sep 30 02:54:49 2003 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* test/ruby/test_iterator.rb: new test
|
||||
test_break__nested_loop[123].
|
||||
|
||||
Mon Sep 29 23:39:13 2003 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/http.rb (finish): does not raise IOError even if
|
||||
|
|
|
@ -359,4 +359,43 @@ class TestIterator < Test::Unit::TestCase
|
|||
def test_iter4
|
||||
ITER_TEST4.new.foo(44){55}
|
||||
end
|
||||
|
||||
def test_break__nested_loop1
|
||||
_test_break__nested_loop1 do
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
def _test_break__nested_loop1
|
||||
while true
|
||||
yield
|
||||
end
|
||||
assert(false, "must not reach here")
|
||||
end
|
||||
|
||||
def test_break__nested_loop2
|
||||
_test_break__nested_loop2 do
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
def _test_break__nested_loop2
|
||||
until false
|
||||
yield
|
||||
end
|
||||
assert(false, "must not reach here")
|
||||
end
|
||||
|
||||
def test_break__nested_loop3
|
||||
_test_break__nested_loop3 do
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
def _test_break__nested_loop3
|
||||
loop do
|
||||
yield
|
||||
end
|
||||
assert(false, "must not reach here")
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче