[erlang-questions] common test cleanup

Joel Reymont joelr1@REDACTED
Fri Jul 29 23:21:57 CEST 2011


Consider the following fragment…

end_per_testcase(pass_config, Config) ->
    {_, Config1} = ?config(saved_config, Config),
    true = ?config(pass_config, Config1).

pass_config(Config) ->
    {save_config, [{pass_config, true}|Config]}.

This results in a message "Could not find element saved_config in Config." and a crash.

Is there no way to modify the Config in the test function and pass it to end_per_testcase?

	Thanks, Joel

--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------






More information about the erlang-questions mailing list