In my test framework, Midje, http://github.com/marick/Midje, a test written in
the most heavily syntactically-sugared form might look like this:
(facts
(complicated-function ...some-integer...) => 5
(provided
(simple-function ...some-integer...) => 2
(other-function ...some-integer...) => 3
...some-integer... => even?)
...)
A test failure could be associated with any point where there's an arrow.
Because (fact) is a macro, the straightforward way of getting the line number
gets the line number of the very beginning of the form. Is there a clever way
to get the line number of the arrows? (There's no hook into the reader, is
there?)
What I'm going to do unless you save me is two things:
1) the failure messages will tell you the failure is associated with, say, the
3rd arrow.
2) When emacs sends the form down to the interpreter, I'll have it annotate it
with the correct line numbers. That way, a simple keyboard gesture will take me
to the failing line.
Better ideas for fallbacks?
-----
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en