Structuring unit tests

Gaspar Chilingarov nm@REDACTED
Sun Apr 17 12:57:07 CEST 2005


Well, and how do you test functions, which are not exported from foo module?

I'm getting a lot of utilitary functions,. which are used only inside of
module, but i want to test them explictly.

another question - how do you following thing in Erlang?
in OO world I can define some object, then inherit from it in unit test, and
override some functions. Thus i can create necessary environment for tested
class. How this can be implemented in Erlang? I also accept answers "this is
not an erlangish way at all" :)


> Joel Reymont wrote:
>
>> How do you prefer to structure your tests?
>
> I put the unit tests for module foo in module foo_ut, and
> only test exported functions (the others get tested implicitly).
>
> I use pattern matches as assertions.
>
> Regards,
>
> Dominic Williams
> http://www.dominicwilliams.net
>
> ----
>


-- 
Gaspar Chilingarov
System Administrator

t +3749 419763
w www.web.am
e nm@REDACTED



More information about the erlang-questions mailing list