Skip to content

Commit b22ae6b

Browse files
authored
Add datatype tests for empty (#85)
* Add datatype tests for empty * Add datatype tests for empty * Add datatype tests for empty
1 parent 5e5198c commit b22ae6b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/clojure/core_test/empty.cljc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,16 @@
2424
nil r/max-int
2525
nil r/min-int
2626
#?@(:cljs [nil (js/Date)]
27-
:clj [nil (new Object)])))))
27+
:clj [nil (new Object)])))
28+
29+
(when-var-exists clojure.core/defrecord
30+
(testing "record"
31+
(defrecord Record [field])
32+
#?@(:cljs [(is (= nil (empty (->Record ""))))]
33+
:clj [(is (thrown? UnsupportedOperationException (empty (->Record ""))))])))
34+
35+
(when-var-exists clojure.core/deftype
36+
(testing "datatype"
37+
(deftype Type [field])
38+
(is (= nil (empty (->Type ""))))))))
39+

0 commit comments

Comments
 (0)