EUnit 2.0 alpha testers wanted

Richard Carlsson <>
Wed Apr 19 22:46:35 CEST 2006


Vlad Dumitrescu wrote:
> I didn't explain properly. I don't mean the result of the test function,
> but what normally is (as you say) printed out with io:formats in the
> code. What I mean is that instead of capturing the results of io:format
> (i.e. the displayed strings), I may want to get the original terms, so
> that another renderer than io:format could display it in a more
> apropriate way (for example folding long terms, or maybe having the
> terms describe a graphical picture).
> 
> One simple way would be to have a ?_message(Format, [Terms]) that in the
> simplest form translates to an io:format call, but not necessarily.

I think I see now. You want a standard way of inserting _new_ "debugging
printouts" (or breadcrumbs or whatever you might want to call them), and
not merely handle existing printouts (perhaps enabled by defining DEBUG
in a makefile) in existing code. Interesting. I'll have to think about it.

> Or maybe I am just making life more complicated than it should be and
> there is a better way right under my nose... :-)

Tell me if you find it.

	/Richard

PS. Oh, by the way, I've just fixed the I/O redirection thing. Had to
find a good way of collecting the output and associating it with the
corresponding test (even when a single process runs several tests),
but it could actually be done in a very nice way with minimal overhead.


-- 
 "Having users is like optimization: the wise course is to delay it."
   -- Paul Graham



More information about the erlang-questions mailing list