Good one Hans, I'm going to steal that trick ^_^...

On Fri, 2009-07-24 at 16:33 +0200, Hans Ulrich Niedermann wrote:
On Mon, 29 Jun 2009 11:52:04 -0400
Edward Garson <> wrote:

> Typically (at least for me) the game is getting a specific test to
> pass, so I'm usually only interested to compile and load a couple of
> modules before running my test: 
> 1> c(foo).
> ok
> 2> c(foo_test).
> ok


> 3> F = fun() -> c(foo), c(foo_test), foo_test:current_test() end. 
> Then all you need is:
> 4> F().
> I use this a lot; it's extremely quick and convenient, not to mention
> having a REPL in which to perform exploratory testing.

I have been using something like that for some time as well, but have
often run into a serious problem: When any of those compilations fails,
and I do not very closely watch the compilation output, I don't notice
the failure and make the wrong assumptions about the code which now runs
during the test case.

Therefore, I am now habitually changing all my

5> c(foo).

calls to

6> {ok,_} = c(foo).

That gives me a clear exception before running the test case which
makes sure that I notice it.


This e-mail and its attachments are confidential, legally privileged, may be subject to copyright and sent solely for the attention of the addressee(s).
Any unauthorized use or disclosure is prohibited. Statements and opinions expressed in this e-mail may not represent those of Radialpoint.

Le contenu de ce courriel est confidentiel, privilégié et peut être soumis à des droits d'auteur. Il est envoyé à l'intention exclusive de son ou de ses
destinataires. Il est interdit de l'utiliser ou de le divulguer sans autorisation. Les opinions exprimées dans le présent courriel peuvent diverger de celles de Radialpoint.