File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 (is (NaN? (dec ##NaN ))))
2525
2626 (testing " underflow"
27- #?(:cljr (is (p/thrown? (dec Int64/MinValue)))
28- :phel (is (= (dec php/PHP_INT_MIN) (dec php/PHP_INT_MIN)))
27+ #?(:phel (is (= (dec min-int) (dec min-int)))
2928 :lpy [] ; Python integers cannot underflow
30- :jank (is (p/thrown? (dec min-int)))
31- :cljs (is (= (dec js/Number.MIN_SAFE_INTEGER) (- js/Number.MIN_SAFE_INTEGER 2 )))
32- :clj (is (p/thrown? (dec Long/MIN_VALUE)))
33- :default (is false " TODO underflow" )))
29+ :cljs (is (= (dec min-int) (- min-int 2 )))
30+ :default (is (p/thrown? (dec min-int)))))
3431
3532 (testing " dec-nil"
3633 ; ; ClojureScript says (= -1 (dec nil)) because JavaScript casts null to 0
Original file line number Diff line number Diff line change 2525 (is (NaN? (inc ##NaN ))))
2626
2727 (testing " overflow"
28- #?(:cljr (is (p/thrown? (inc Int64/MaxValue)))
29- ; ; Phel integers avoid overflow by being promoted to BigInteger
30- :phel (is (not (= (inc php/PHP_INT_MAX) (+ 2 php/PHP_INT_MAX))))
28+ #?(;; Phel integers avoid overflow by being promoted to BigInteger
29+ :phel (is (not (= (inc max-int) (+ 2 max-int))))
3130 :lpy nil ; Python integers cannot overflow
32- :jank (is (p/thrown? (inc max-int)))
33- :cljs (is (= (inc js/Number.MAX_SAFE_INTEGER) (+ 2 js/Number.MAX_SAFE_INTEGER)))
34- :clj (is (p/thrown? (inc Long/MAX_VALUE)))
35- :default (is false " overflow untested" )))
31+ :cljs (is (= (inc max-int) (+ 2 max-int)))
32+ :default (is (p/thrown? (inc max-int)))))
3633
3734 (testing " inc-nil"
3835 ; ; ClojureScript says (= 1 (inc nil)) because JavaScript casts null to 0
You can’t perform that action at this time.
0 commit comments