File tree Expand file tree Collapse file tree 26 files changed +115
-108
lines changed
Expand file tree Collapse file tree 26 files changed +115
-108
lines changed Original file line number Diff line number Diff line change 1919 :default
2020 [-1/5 1/5 ]))
2121 (is (NaN? (abs ##NaN )))
22- (is (thrown? #?(:cljs :default :clj NullPointerException ) (abs nil ))))
22+ (is (thrown? #?(:cljs :default :clj Exception ) (abs nil ))))
2323
2424 (testing " unboxed"
2525 (let [a 42
Original file line number Diff line number Diff line change 55
66(when-var-exists clojure.core/bit-and
77 (deftest test-bit-and
8- #? (:clj (is (thrown? NullPointerException (bit-and nil 1 )))
9- :cljs (is (bit-and nil 1 )))
10- #? (:clj (is (thrown? NullPointerException (bit-and 1 nil )))
11- :cljs (is (bit-and 1 nil )))
8+ #? (:clj (is (thrown? Exception (bit-and nil 1 )))
9+ :cljs (is (= 0 ( bit-and nil 1 ) )))
10+ #? (:clj (is (thrown? Exception (bit-and 1 nil )))
11+ :cljs (is (= 0 ( bit-and 1 nil ) )))
1212
1313 (are [ex a b] (= ex (bit-and a b))
1414 8 12 9
Original file line number Diff line number Diff line change 55
66(when-var-exists clojure.core/bit-and-not
77 (deftest test-bit-and-not
8- #? (:clj (is (thrown? NullPointerException (bit-and-not nil 1 )))
9- :cljs (is (bit-and-not nil 1 )))
10- #? (:clj (is (thrown? NullPointerException (bit-and-not 1 nil )))
11- :cljs (is (bit-and-not 1 nil )))
8+ #? (:clj (is (thrown? Exception (bit-and-not nil 1 )))
9+ :cljs (is (= 0 ( bit-and-not nil 1 ) )))
10+ #? (:clj (is (thrown? Exception (bit-and-not 1 nil )))
11+ :cljs (is (= 1 ( bit-and-not 1 nil ) )))
1212
1313 (are [ex a b] (= ex (bit-and-not a b))
1414 0 0 0
Original file line number Diff line number Diff line change 44
55(when-var-exists clojure.core/bit-clear
66 (deftest test-bit-clear
7- #? (:clj (is (thrown? NullPointerException (bit-clear nil 1 )))
8- :cljs (is (bit-clear nil 1 )))
9- #? (:clj (is (thrown? NullPointerException (bit-clear 1 nil )))
10- :cljs (is (bit-clear 1 nil )))
7+ #? (:clj (is (thrown? Exception (bit-clear nil 1 )))
8+ :cljs (is (= 0 ( bit-clear nil 1 ) )))
9+ #? (:clj (is (thrown? Exception (bit-clear 1 nil )))
10+ :cljs (is (= 0 ( bit-clear 1 nil ) )))
1111
1212 (are [ex a b] (= ex (bit-clear a b))
1313 3 11 3 )))
Original file line number Diff line number Diff line change 44
55(when-var-exists clojure.core/bit-flip
66 (deftest test-bit-flip
7- #? (:clj (is (thrown? NullPointerException (bit-flip nil 1 )))
8- :cljs (is (bit-flip nil 1 )))
9- #? (:clj (is (thrown? NullPointerException (bit-flip 1 nil )))
10- :cljs (is (bit-flip 1 nil )))
7+ #? (:clj (is (thrown? Exception (bit-flip nil 1 )))
8+ :cljs (is (= 2 ( bit-flip nil 1 ) )))
9+ #? (:clj (is (thrown? Exception (bit-flip 1 nil )))
10+ :cljs (is (= 0 ( bit-flip 1 nil ) )))
1111
1212 (are [ex a b] (= ex (bit-flip a b))
1313 2r1111 2r1011 2
Original file line number Diff line number Diff line change 44
55(when-var-exists clojure.core/bit-not
66 (deftest test-bit-not
7- #? (:clj (is (thrown? NullPointerException (bit-not nil )))
8- :cljs (is (bit-not nil )))
7+ #? (:clj (is (thrown? Exception (bit-not nil )))
8+ :cljs (is (= -1 ( bit-not nil ) )))
99
1010 (are [ex a] (= ex (bit-not a))
1111 -2r1000 2r0111
Original file line number Diff line number Diff line change 55
66(when-var-exists clojure.core/bit-or
77 (deftest test-bit-or
8- #? (:clj (is (thrown? NullPointerException (bit-or nil 1 )))
8+ #? (:clj (is (thrown? Exception (bit-or nil 1 )))
99 :cljs (is (bit-or nil 1 )))
10- #? (:clj (is (thrown? NullPointerException (bit-or 1 nil )))
10+ #? (:clj (is (thrown? Exception (bit-or 1 nil )))
1111 :cljs (is (bit-or 1 nil )))
1212
1313 (are [ex a b] (= ex (bit-or a b))
Original file line number Diff line number Diff line change 44
55(when-var-exists clojure.core/bit-set
66 (deftest test-bit-set
7- #? (:clj (is (thrown? NullPointerException (bit-set nil 1 )))
7+ #? (:clj (is (thrown? Exception (bit-set nil 1 )))
88 :cljs (is (bit-set nil 1 )))
9- #? (:clj (is (thrown? NullPointerException (bit-set 1 nil )))
9+ #? (:clj (is (thrown? Exception (bit-set 1 nil )))
1010 :cljs (is (bit-set 1 nil )))
1111
1212 (are [ex a b] (= ex (bit-set a b))
Original file line number Diff line number Diff line change 44
55(when-var-exists clojure.core/bit-shift-left
66 (deftest test-bit-shift-left
7- #? (:clj (is (thrown? NullPointerException (bit-shift-left nil 1 )))
8- :cljs (is (bit-shift-left nil 1 )))
9- #? (:clj (is (thrown? NullPointerException (bit-shift-left 1 nil )))
10- :cljs (is (bit-shift-left 1 nil )))
7+ #? (:clj (is (thrown? Exception (bit-shift-left nil 1 )))
8+ :cljs (is (= 0 ( bit-shift-left nil 1 ) )))
9+ #? (:clj (is (thrown? Exception (bit-shift-left 1 nil )))
10+ :cljs (is (= 1 ( bit-shift-left 1 nil ) )))
1111
1212 (are [ex a b] (= ex (bit-shift-left a b))
1313 1024 1 10
Original file line number Diff line number Diff line change 44
55(when-var-exists clojure.core/bit-shift-right
66 (deftest test-bit-shift-right
7- #? (:clj (is (thrown? NullPointerException (bit-shift-right nil 1 )))
7+ #? (:clj (is (thrown? Exception (bit-shift-right nil 1 )))
88 :cljs (is (bit-shift-right nil 1 )))
9- #? (:clj (is (thrown? NullPointerException (bit-shift-right 1 nil )))
9+ #? (:clj (is (thrown? Exception (bit-shift-right 1 nil )))
1010 :cljs (is (bit-shift-right 1 nil )))
1111
1212 (are [ex a b] (= ex (bit-shift-right a b))
You can’t perform that action at this time.
0 commit comments