Skip to content

Commit a6f0100

Browse files
committed
fix tests
1 parent 0d85ea0 commit a6f0100

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/test/clojure/clojure/tools/emitter/jvm/passes_test.clj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
(deftest collect-test
1515
(binding [ana.jvm/run-passes (schedule (conj ana.jvm/default-passes #'collect #'collect-closed-overs))]
1616
(let [c-test (-> (ast1 (let [a 1 b 2] (fn [x] (fn [] [+ (:foo {}) x a]))))
17-
:body :ret)]
17+
:body)]
1818
(is (= '#{a__#0} (-> c-test :closed-overs keys set)))
1919
(is (set/subset? #{{:form :foo
2020
:tag Keyword
@@ -25,8 +25,8 @@
2525
{:form {}
2626
:tag PersistentArrayMap
2727
:meta nil}}
28-
(-> c-test :methods first :body :ret :constants keys set))) ;; it registers metadata too (line+col info)
29-
(is (= '#{a__#0 x__#0} (-> c-test :methods first :body :ret :closed-overs keys set))))))
28+
(-> c-test :methods first :body :constants keys set))) ;; it registers metadata too (line+col info)
29+
(is (= '#{a__#0 x__#0} (-> c-test :methods first :body :closed-overs keys set))))))
3030

3131
(deftest clear-locals-test
3232
(binding [ana.jvm/run-passes (schedule (conj ana.jvm/default-passes #'clear-locals))]
@@ -40,24 +40,24 @@
4040
(is (= true (-> f-expr :ret :else :then :to-clear?)))
4141
(is (= true (-> f-expr :ret :else :else :to-clear?))))
4242
(let [f-expr (-> (ast1 (fn [x] (loop [a x] (if 1 x (do x (recur x))))))
43-
:methods first :body :ret)]
43+
:methods first :body )]
4444
(is (= true (-> f-expr :bindings first :init :to-clear? nil?)))
45-
(is (= true (-> f-expr :body :ret :then :to-clear?)))
46-
(is (= true (-> f-expr :body :ret :else :statements first :to-clear? nil?)))
47-
(is (= true (-> f-expr :body :ret :else :ret :exprs first :to-clear? nil?))))
45+
(is (= true (-> f-expr :body :then :to-clear?)))
46+
(is (= true (-> f-expr :body :else :statements first :to-clear? nil?)))
47+
(is (= true (-> f-expr :body :else :ret :exprs first :to-clear? nil?))))
4848
(let [f-expr (-> (ast1 (loop [] (let [a 1] (loop [] a)) (recur)))
49-
:body :statements first :body :ret :body :ret)]
49+
:body :statements first :body :body)]
5050
(is (= true (-> f-expr :to-clear?))))
5151
(let [f-expr (-> (ast1 (loop [] (let [a 1] (loop [] (if 1 a (recur)))) (recur)))
52-
:body :statements first :body :ret :body :ret :then)]
52+
:body :statements first :body :body :then)]
5353
(is (= true (-> f-expr :to-clear?))))
5454
(let [f-expr (-> (ast1 (let [a 1] (loop [] (let [b 2] (loop [] (if 1 [a b] (recur)))) (recur))))
55-
:body :ret :body :statements first :body :ret :body :ret :then :items)]
55+
:body :body :statements first :body :body :then :items)]
5656
(is (= true (-> f-expr first :to-clear? nil?)))
5757
(is (= true (-> f-expr second :to-clear?))))
5858
(let [f-expr (-> (ast1 (let [a 1] (loop [] (if 1 a) (recur))))
59-
:body :ret :body :statements first :then)]
59+
:body :body :statements first :then)]
6060
(is (= true (-> f-expr :to-clear? nil?))))
6161
(let [f-expr (-> (ast1 (let [a 1] (loop [] (let [x (if 1 a)]) (recur))))
62-
:body :ret :body :statements first :bindings first :init :then)]
62+
:body :body :statements first :bindings first :init :then)]
6363
(is (= true (-> f-expr :to-clear? nil?))))))

0 commit comments

Comments
 (0)