mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_array.rb (test_misc): added some tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ad68774c1
commit
fbf2bcf37d
1 changed files with 11 additions and 0 deletions
|
@ -97,6 +97,17 @@ class TestArray < Test::Unit::TestCase
|
||||||
x = [1,2,3]
|
x = [1,2,3]
|
||||||
x.concat(x)
|
x.concat(x)
|
||||||
assert_equal([1,2,3,1,2,3], x)
|
assert_equal([1,2,3,1,2,3], x)
|
||||||
|
|
||||||
|
x = [1,2,3]
|
||||||
|
x.clear
|
||||||
|
assert_equal([], x)
|
||||||
|
|
||||||
|
x = [1,2,3]
|
||||||
|
y = x.dup
|
||||||
|
x << 4
|
||||||
|
y << 5
|
||||||
|
assert_equal([1,2,3,4], x)
|
||||||
|
assert_equal([1,2,3,5], y)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_beg_end
|
def test_beg_end
|
||||||
|
|
Loading…
Reference in a new issue