File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -9753,6 +9753,24 @@ reduces them without incurring seq initialization"
9753
9753
(throw (js/Error. (str " Cannot compare " x " to " y)))))
9754
9754
9755
9755
PersistentVector
9756
+ (-compare [x y]
9757
+ (if (vector? y)
9758
+ (compare-indexed x y)
9759
+ (throw (js/Error. (str " Cannot compare " x " to " y)))))
9760
+
9761
+ MapEntry
9762
+ (-compare [x y]
9763
+ (if (vector? y)
9764
+ (compare-indexed x y)
9765
+ (throw (js/Error. (str " Cannot compare " x " to " y)))))
9766
+
9767
+ BlackNode
9768
+ (-compare [x y]
9769
+ (if (vector? y)
9770
+ (compare-indexed x y)
9771
+ (throw (js/Error. (str " Cannot compare " x " to " y)))))
9772
+
9773
+ RedNode
9756
9774
(-compare [x y]
9757
9775
(if (vector? y)
9758
9776
(compare-indexed x y)
Original file line number Diff line number Diff line change 133
133
:key (e 0 :not-found )
134
134
:val (e 1 :not-found )
135
135
:not-found (e 2 :not-found )
136
- :not-found (e -1 :not-found ))))))
136
+ :not-found (e -1 :not-found ))))
137
+
138
+ (testing " IComparable"
139
+ (testing " -compare"
140
+ (is (zero? (-compare e [:key :val ])))))))
137
141
138
142
(deftest all-map-entry-tests
139
143
(testing " BlackNode"
You can’t perform that action at this time.
0 commit comments