Skip to content

Commit 6547df4

Browse files
committed
Group compilation error tests together
1 parent 78cc711 commit 6547df4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/clj/cider/nrepl/middleware/stacktrace_test.clj

+11-11
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,19 @@
116116
(:data (analyze-cause (ex-info "" {:a (range)}) pprint {:length 3})))))
117117
(testing "print-level"
118118
(is (= "{:a {#}}"
119-
(:data (analyze-cause (ex-info "" {:a {:b {:c {:d {:e nil}}}}}) pprint {:level 3})))))
120-
(testing "compilation errors"
121-
(let [clojure-version ((juxt :major :minor) *clojure-version*)]
122-
(if (< (compare clojure-version [1 10]) 0)
123-
;; 1.8 / 1.9
124-
(is (re-find #"Unable to resolve symbol: not-defined in this context"
125-
(:message (first causes3))))
126-
127-
;; 1.10+
128-
(is (re-find #"Syntax error compiling at \(cider/nrepl/middleware/stacktrace_test\.clj:"
129-
(:message (first causes3))))))))
119+
(:data (analyze-cause (ex-info "" {:a {:b {:c {:d {:e nil}}}}}) pprint {:level 3}))))))
130120

131121
(deftest compilation-errors-test
122+
(let [clojure-version ((juxt :major :minor) *clojure-version*)]
123+
(if (< (compare clojure-version [1 10]) 0)
124+
;; 1.8 / 1.9
125+
(is (re-find #"Unable to resolve symbol: not-defined in this context"
126+
(:message (first causes3))))
127+
128+
;; 1.10+
129+
(is (re-find #"Syntax error compiling at \(cider/nrepl/middleware/stacktrace_test\.clj:"
130+
(:message (first causes3))))))
131+
132132
(testing "extract-location"
133133
(is (= {:class "clojure.lang.Compiler$CompilerException"
134134
:message "java.lang.RuntimeException: Unable to resolve symbol: foo in this context"

0 commit comments

Comments
 (0)