[erlang-questions] Structuring an Eunit Suite

Ben Hood 0x6e6562@REDACTED
Thu Jan 15 12:32:55 CET 2009


Adam,

On Thu, Jan 15, 2009 at 11:23 AM, Adam Lindberg
<adam@REDACTED> wrote:
> foo_test_() ->
>    lists:map(fun test_util:foo_test/1, [new_connection(), some_other_connection()]).
>
> Does this seem to be what you want?

No, it's the other way around.

The test_util module has n exported test functions, so I'd like to be
able to run every function and pass in the specific connection every
time, e.g.

test_util:foo_test(new_connection()),
test_util:bar_test(new_connection()),
test_util:baz_test(new_connection()),

...... and so on for each test in the test_util module.

Ben



More information about the erlang-questions mailing list