summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-29 19:35:50 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-29 19:35:50 +0000
commit0d0c31ff8414edc38417b7b172819275e03f4dc3 (patch)
treeb428b50b998547922d3dc15622137d69494bb455 /test
parentc5ed8911f282a04b96d0f0241055542894dc2c9b (diff)
Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb1
-rw-r--r--test/ruby/test_enum.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 58ffe52675..4c7c3dfb6d 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -530,6 +530,7 @@ class TestArray < Test::Unit::TestCase
def test_count
a = @cls[1, 2, 3, 1, 2]
+ assert_equal(5, a.count)
assert_equal(2, a.count(1))
assert_equal(3, a.count {|x| x % 2 == 1 })
assert_equal(2, a.count(1) {|x| x % 2 == 1 })
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb
index 6171c9a234..e541d566c0 100644
--- a/test/ruby/test_enum.rb
+++ b/test/ruby/test_enum.rb
@@ -29,6 +29,7 @@ class TestEnumerable < Test::Unit::TestCase
end
def test_count
+ assert_equal(5, @obj.count)
assert_equal(2, @obj.count(1))
assert_equal(3, @obj.count {|x| x % 2 == 1 })
assert_equal(2, @obj.count(1) {|x| x % 2 == 1 })