file-position

clojure.test

  • (file-position n)
Returns a vector [filename line-number] for the nth call up the
stack.

Deprecated in 1.2: The information needed for test reporting is
now on :file and :line keys in the result map.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/test.clj:281 top

(defn file-position
  "Returns a vector [filename line-number] for the nth call up the
  stack.

  Deprecated in 1.2: The information needed for test reporting is
  now on :file and :line keys in the result map."
  {:added "1.1"
   :deprecated "1.2"}
  [n]
  (let [^StackTraceElement s (nth (.getStackTrace (new java.lang.Throwable)) n)]
    [(.getFileName s) (.getLineNumber s)]))
Vars in clojure.test/file-position:
Used in 0 other vars

Comments top

No comments for file-position. Log in to add a comment.