Skip to content

Commit ff07bf0

Browse files
committed
Add test for when-let returning too many forms.
1 parent 91fbdf2 commit ff07bf0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/clojure/core_test/when_let.cljc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@
3030
(swap! counter inc)
3131
(swap! counter inc)
3232
:bar)))
33-
(is (= 3 @counter))))))
33+
(is (= 3 @counter))))
34+
(testing "when-let accepts exactly two"
35+
(is (thrown? clojure.lang.Compiler$CompilerException
36+
(macroexpand
37+
'(when-let [x (range 5) y (range 5)])))))))

0 commit comments

Comments
 (0)