Permalink
Browse files

add test

  • Loading branch information...
ninjudd committed Nov 20, 2009
1 parent 3862057 commit 23b5e89f6859e9b335e5e57fc84e8fc4e7e2dfe8
Showing with 8 additions and 0 deletions.
  1. +8 −0 test/tuple_test.rb
View
@@ -24,6 +24,14 @@ class TupleTest < Test::Unit::TestCase
assert_equal [1], Tuple.load(Tuple.dump(1))
end
+ should "dump times consistently" do
+ t = '2009-10-15 1:23:45 PM'
+ tuple = Tuple.dump(Time.parse(t))
+ 100000.times do
+ assert_equal tuple, Tuple.dump(Time.parse(t))
+ end
+ end
+
should "sort tuples using binary" do
now = Time.now.getgm
today = Date.parse(now.to_s)

0 comments on commit 23b5e89

Please sign in to comment.