File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed 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."
9331
9331
9332
9332
IHash
9333
9333
(-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))))
9335
9339
9336
9340
; ;; ExceptionInfo
9337
9341
Original file line number Diff line number Diff line change 1629
1629
(get {(UUID. " 550e8400-e29b-41d4-a716-446655440000" ) 42 }
1630
1630
(UUID. " 666e8400-e29b-41d4-a716-446655440000" )
1631
1631
: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" ))))
1632
1638
))
1633
1639
1634
1640
(deftest test-comparable
You can’t perform that action at this time.
0 commit comments