File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 885885 (-hash ^not-native o)
886886
887887 (number? o)
888- (js-mod (Math/floor o) 2147483647 )
888+ (if (js/isFinite o)
889+ (js-mod (Math/floor o) 2147483647 )
890+ (case o
891+ Infinity
892+ 2146435072
893+ -Infinity
894+ -1048576
895+ 2146959360 ))
889896
890897 (true ? o) 1
891898
Original file line number Diff line number Diff line change 31253125 (-lookup [o k not-found] :3-arity ))
31263126 [:foo ]))))
31273127
3128+ (deftest test-cljs-1594
3129+ (is (not (js/isNaN (hash Infinity))))
3130+ (is (not (js/isNaN (hash -Infinity))))
3131+ (is (not (js/isNaN (hash NaN))))
3132+ (is (= (hash-set Infinity -Infinity 0 1 2 3 4 5 6 7 8 )
3133+ (set (keys (zipmap [Infinity -Infinity 0 1 2 3 4 5 6 7 8 ] (repeat nil )))))))
31283134
31293135(comment
31303136 ; ; ObjMap
You can’t perform that action at this time.
0 commit comments