Skip to content

Commit

Permalink
Delete an iffy loop test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodiologist committed Nov 22, 2024
1 parent 6707476 commit 7ef8e0a
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/test_loop.hy
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,6 @@
(assert (= (tco-sum 100 10,000) 10,100)))


(defn test-recur-in-wrong-loc []
(defn bad-recur [n]
(loop [[i n]]
(if (= i 0)
0
(inc (recur (dec i))))))

(try
(bad-recur 3)
(except [e TypeError]
(assert True))
(else
(assert False))))


(defn test-recur-string []
"`loop` shouldn't touch a string named `recur`."
(assert (= (loop [] (+ "recur" "1")) "recur1")))

0 comments on commit 7ef8e0a

Please sign in to comment.