OR construction in erlang ?
Wed Apr 13 08:35:13 CEST 2005
> I guess I'll have to do that, but it is basically a case / catch syntax
> : how would you do it in this case:
> true = lists:member(Key, List),
> false = lists:member(Key2, List),
We use a macro in our tests like:
?match(true, lists:member(Key, List)),
?match(false, lists:member(Key2, List)),
AcTuAlReS = (catch (Expr)),
case AcTuAlReS of
?verbose("ok, ~n Result as expected:~p~n",[AcTuAlReS]),
?error("Not Matching Actual result was:~n ~p~n",
The nice thing with a macro is that you can also use ?MODULE,?LINE
to get the location.
More information about the erlang-questions