minor: timestamp test
This commit is contained in:
parent
e1463cdce2
commit
5950f6850f
|
@ -9,6 +9,17 @@ class TiumestampTest < Test::Unit::TestCase
|
|||
assert_equal t2, t1
|
||||
end
|
||||
|
||||
def test_timestamp_range
|
||||
t = 1;
|
||||
while(t < 1_000_000_000 ) do
|
||||
ts = Timestamp.new(t, 0)
|
||||
doc = {:ts => ts}
|
||||
bson = BSON::BSON_CODER.serialize(doc)
|
||||
assert_equal doc[:ts], BSON::BSON_CODER.deserialize(bson)['ts']
|
||||
t = t * 10
|
||||
end
|
||||
end
|
||||
|
||||
def test_implements_array_for_backward_compatibility
|
||||
silently do
|
||||
ts = Timestamp.new(5000, 200)
|
||||
|
|
Loading…
Reference in New Issue