File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9331,7 +9331,11 @@ Maps become Objects. Arbitrary keys are encoded to by key->js."
93319331
93329332 IHash
93339333 (-hash [this]
9334- (goog.string/hashCode (pr-str this))))
9334+ (goog.string/hashCode (pr-str this)))
9335+
9336+ IComparable
9337+ (-compare [_ other]
9338+ (garray/defaultCompare uuid (.-uuid other))))
93359339
93369340; ;; ExceptionInfo
93379341
Original file line number Diff line number Diff line change 16291629 (get {(UUID. " 550e8400-e29b-41d4-a716-446655440000" ) 42 }
16301630 (UUID. " 666e8400-e29b-41d4-a716-446655440000" )
16311631 :not-at-all-found )))
1632+ (is (= -1 (compare (UUID. " 550e8400-e29b-41d4-a716-446655440000" )
1633+ (UUID. " 666e8400-e29b-41d4-a716-446655440000" ))))
1634+ (is (= 1 (compare (UUID. " 550e8400-e29b-41d4-a716-446655440000" )
1635+ (UUID. " 550e8400-a29b-41d4-a716-446655440000" ))))
1636+ (is (= 0 (compare (UUID. " 550e8400-e29b-41d4-a716-446655440000" )
1637+ (UUID. " 550e8400-e29b-41d4-a716-446655440000" ))))
16321638 ))
16331639
16341640(deftest test-comparable
You can’t perform that action at this time.
0 commit comments