зеркало из https://github.com/github/ruby.git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
cbd15bdb95
Коммит
11125bf46a
|
@ -322,11 +322,11 @@ class TestLazyEnumerator < Test::Unit::TestCase
|
|||
|
||||
def test_drop_while
|
||||
a = Step.new(1..10)
|
||||
assert_equal(5, a.drop_while {|i| i < 5}.first)
|
||||
assert_equal(5, a.drop_while {|i| i % 5 > 0}.first)
|
||||
assert_equal(10, a.current)
|
||||
assert_equal(5, a.lazy.drop_while {|i| i < 5}.first)
|
||||
assert_equal(5, a.lazy.drop_while {|i| i % 5 > 0}.first)
|
||||
assert_equal(5, a.current)
|
||||
assert_equal((5..10).to_a, a.lazy.drop_while {|i| i < 5}.to_a)
|
||||
assert_equal((5..10).to_a, a.lazy.drop_while {|i| i % 5 > 0}.to_a)
|
||||
end
|
||||
|
||||
def test_drop_and_take
|
||||
|
|
Загрузка…
Ссылка в новой задаче