Merge pull request #51 from bernerdschaefer/master

BSON test fixes
This commit is contained in:
Kyle Banker 2011-07-11 06:44:18 -07:00
commit 880f40bcaa
3 changed files with 14 additions and 10 deletions

View File

@ -436,8 +436,10 @@ class BSONTest < Test::Unit::TestCase
0x00, 0x00, 0x14, 0x00,
0x00, 0x00, 0x00])
assert_equal 4, result["test"][0]
assert_equal 20, result["test"][1]
silently do
assert_equal 4, result["test"][0]
assert_equal 20, result["test"][1]
end
end
end

View File

@ -88,7 +88,7 @@ class OrderedHashTest < Test::Unit::TestCase
assert_equal [:c, :d], h1.keys
assert_equal [3, 4], h1.values
assert h1.keys.id != h2.keys.id
assert h1.keys.object_id != h2.keys.object_id
end
def test_to_a_order_preserved

View File

@ -10,15 +10,17 @@ class TiumestampTest < Test::Unit::TestCase
end
def test_implements_array_for_backward_compatibility
ts = Timestamp.new(5000, 200)
assert_equal 200, ts[0]
assert_equal 5000, ts[1]
silently do
ts = Timestamp.new(5000, 200)
assert_equal 200, ts[0]
assert_equal 5000, ts[1]
array = ts.map {|t| t }
assert_equal 2, array.length
array = ts.map {|t| t }
assert_equal 2, array.length
assert_equal 200, array[0]
assert_equal 5000, array[1]
assert_equal 200, array[0]
assert_equal 5000, array[1]
end
end
end