Clojure

fix file/line reporting in ant builds

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.2
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Description

clojure.test figures out where a failing test is by manufacturing an exception instance during reporting, then crawling back up the stack a fixed distance to find the test.

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - stu said: [file:aV-RgEC0ur35QUeJe5cbCb]
Hide
Assembla Importer added a comment -

stu said: This fix introduces a (tiny) API change for advanced users of clojure.test. If you are writing your own assert-expr method, you must call the new do-report instead of report. do-report adds :file and :line info to the result map, so that later code doesn't have to guess how far up the stack to crawl.

We can't change report to do this work, because it is rebound by several consumers.

We are unaware of any users who have actually written an assert-expr, so the impact of this change may be zero.

Show
Assembla Importer added a comment - stu said: This fix introduces a (tiny) API change for advanced users of clojure.test. If you are writing your own assert-expr method, you must call the new do-report instead of report. do-report adds :file and :line info to the result map, so that later code doesn't have to guess how far up the stack to crawl. We can't change report to do this work, because it is rebound by several consumers. We are unaware of any users who have actually written an assert-expr, so the impact of this change may be zero.
Hide
Assembla Importer added a comment -

richhickey said: This is still not quite right. When an unanticipated exception happens, it reports the exception cause line, not the test line. I think it should always say:

I was running this test here:
test file + line

and this bad thing happened:
stacktrace with cause up top

Show
Assembla Importer added a comment - richhickey said: This is still not quite right. When an unanticipated exception happens, it reports the exception cause line, not the test line. I think it should always say: I was running this test here: test file + line and this bad thing happened: stacktrace with cause up top
Hide
Assembla Importer added a comment -

stu said: Updating tickets (#381, #386, #388, #391, #377)

Show
Assembla Importer added a comment - stu said: Updating tickets (#381, #386, #388, #391, #377)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: