File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed
Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -9085,9 +9085,12 @@ reduces them without incurring seq initialization"
90859085 (set? other)
90869086 (== (count coll) (count other))
90879087 ^boolean
9088- (reduce-kv
9089- #(or (contains? other %2 ) (reduced false ))
9090- true hash-map)))
9088+ (try
9089+ (reduce-kv
9090+ #(or (contains? other %2 ) (reduced false ))
9091+ true hash-map)
9092+ (catch js/Error ex
9093+ false ))))
90919094
90929095 IHash
90939096 (-hash [coll] (caching-hash coll hash-unordered-coll __hash))
@@ -9236,9 +9239,12 @@ reduces them without incurring seq initialization"
92369239 (set? other)
92379240 (== (count coll) (count other))
92389241 ^boolean
9239- (reduce-kv
9240- #(or (contains? other %2 ) (reduced false ))
9241- true tree-map)))
9242+ (try
9243+ (reduce-kv
9244+ #(or (contains? other %2 ) (reduced false ))
9245+ true tree-map)
9246+ (catch js/Error ex
9247+ false ))))
92429248
92439249 IHash
92449250 (-hash [coll] (caching-hash coll hash-unordered-coll __hash))
Original file line number Diff line number Diff line change 1+ (ns cljs.set-equiv-test
2+ (:refer-clojure :exclude [iter])
3+ (:require [cljs.test :refer-macros [deftest testing is]]
4+ [clojure.string :as s]
5+ [clojure.set :as set]))
6+
7+ (deftest test-set-equality
8+ (testing " Testing set equality"
9+ (is (= (sorted-set 3 2 1 ) (sorted-set 1 2 3 )))
10+ (is (= (hash-set 3 2 1 ) (sorted-set 1 2 3 )))
11+ (is (= (sorted-set :a :b :c ) (hash-set :a :b :c )))
12+ (is (= (hash-set :a :b :c ) (hash-set :a :b :c ))))
13+
14+ (testing " CLJS-2731 uncomparable values"
15+ (is (not= (sorted-set 3 2 1 ) (sorted-set :a :b :c )))
16+ (is (not= (hash-set 3 2 1 ) (sorted-set :a :b :c )))
17+ (is (not= (sorted-set 3 2 1 ) (hash-set :a :b :c )))
18+ (is (not= (hash-set 3 2 1 ) (hash-set :a :b :c )))))
Original file line number Diff line number Diff line change 303303 [cljs.clojure-alias-test]
304304 [cljs.hash-map-test]
305305 [cljs.map-entry-test]
306+ [cljs.set-equiv-test]
306307 [cljs.syntax-quote-test]
307308 [cljs.predicates-test]
308309 [cljs.test-test]
345346 'cljs.clojure-alias-test
346347 'cljs.hash-map-test
347348 'cljs.map-entry-test
349+ 'cljs.set-equiv-test
348350 'cljs.syntax-quote-test
349351 'cljs.predicates-test
350352 'cljs.test-test
You can’t perform that action at this time.
0 commit comments