count checks

This commit is contained in:
Mike Dirolf 2009-03-11 13:37:42 -04:00
parent d8a8c03a81
commit acaf635e33

View File

@ -44,12 +44,17 @@ class CursorTest < Test::Unit::TestCase
1000.times { |i|
@@coll.insert('a' => i)
}
assert_equal 1001, @@coll.count
count = 0
@@coll.find.each { |obj|
count += obj['a']
}
# do the same thing again for debugging
assert_equal 1001, @@coll.count
count2 = 0
@@coll.find.each { |obj|
count2 += obj['a']
@ -67,12 +72,17 @@ class CursorTest < Test::Unit::TestCase
1000.times { |i|
coll.insert('a' => i)
}
assert_equal 1001, coll.count
count = 0
coll.find.each { |obj|
count += obj['a']
}
# do the same thing again for debugging
assert_equal 1001, coll.count
count2 = 0
coll.find.each { |obj|
count2 += obj['a']