Skip to content

Commit

Permalink
Merge pull request #37 from timsgardner/clr
Browse files Browse the repository at this point in the history
Making orchestra.spec.test compatible with Clojure-CLR
  • Loading branch information
jeaye authored Jan 27, 2019
2 parents fdaa0aa + 5dfa14f commit 8801b86
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ failure in instrument."
(map interpret-stack-trace-element)
(filter :var-scope)
(drop-while plumbing?))
elems)))
#?(:clj elems
:cljr (.. elems GetFrames)))))

(defn- spec-checking-fn
[v f raw-fn-spec]
Expand All @@ -96,7 +97,8 @@ failure in instrument."
(with-instrument-disabled
(let [conformed (s/conform spec data)]
(if (= ::s/invalid conformed)
(let [caller (->> (.getStackTrace (Thread/currentThread))
(let [caller (->> #?(:clj (.getStackTrace (Thread/currentThread))
:cljr (System.Diagnostics.StackTrace. true))
stacktrace-relevant-to-instrument
first)
via (if-some [n (#'s/spec-name spec)]
Expand Down

0 comments on commit 8801b86

Please sign in to comment.