File tree 2 files changed +10
-1
lines changed
test/clojure/test_clojure
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
(in-ns 'clojure.core)
12
12
13
+ (import '(clojure.lang Murmur3))
14
+
13
15
; (set! *warn-on-reflection* true)
14
16
15
17
(deftype VecNode [edit arr])
145
147
(clojure.lang.Util/hash val))
146
148
(inc i))))))
147
149
150
+ ; todo - cache
151
+ clojure.lang.IHashEq
152
+ (hasheq [this]
153
+ (Murmur3/hashOrdered this))
154
+
148
155
clojure.lang.Counted
149
156
(count [_] cnt)
150
157
Original file line number Diff line number Diff line change 327
327
(vector-of " " ))))
328
328
(testing " vector-like (vector-of :type x1 x2 x3 … xn)"
329
329
(are [vec gvec] (and (instance? clojure.core.Vec gvec)
330
- (= (into (vector-of :int ) vec) gvec))
330
+ (= (into (vector-of :int ) vec) gvec)
331
+ (= vec gvec)
332
+ (= (hash vec) (hash gvec)))
331
333
[1 ] (vector-of :int 1 )
332
334
[1 2 ] (vector-of :int 1 2 )
333
335
[1 2 3 ] (vector-of :int 1 2 3 )
You can’t perform that action at this time.
0 commit comments