File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 957957 IEquiv
958958 (-equiv [o other]
959959 (and (instance? js/Date other)
960- (identical? (.toString o) (.toString other)))))
960+ (== (.valueOf o) (.valueOf other))))
961+
962+ IComparable
963+ (-compare [this other]
964+ (garray/defaultCompare (.valueOf this) (.valueOf other))))
961965
962966(extend-type number
963967 IEquiv
Original file line number Diff line number Diff line change 16731673 (is (= -1 (compare (subvec [1 2 3 ] 1 ) (subvec [1 2 4 ] 1 ))))
16741674 (is (= 0 (compare (subvec [1 2 3 ] 1 ) (subvec [1 2 3 ] 1 ))))
16751675 (is (= 1 (compare (subvec [1 2 4 ] 1 ) (subvec [1 2 3 ] 1 )))))
1676+
1677+ (is (= 0 (compare (js/Date. 2015 2 8 19 13 00 999 )
1678+ (js/Date. 2015 2 8 19 13 00 999 ))))
1679+ (is (= -1 (compare (js/Date. 2015 2 8 19 12 00 999 )
1680+ (js/Date. 2015 2 8 19 13 00 999 ))))
1681+ (is (= 1 (compare (js/Date. 2015 2 8 19 14 00 999 )
1682+ (js/Date. 2015 2 8 19 13 00 999 ))))
16761683 )
16771684
16781685(deftest test-dot
You can’t perform that action at this time.
0 commit comments