[erlang-questions] eunit question
Tue Nov 3 03:31:09 CET 2015
No-no-no, you shouldn't change them all to commas!
They are different - comma act as AND, while semicolon act as OR. Good luck!
2015-11-03 7:27 GMT+06:00 Michael Martin <mmartin4242@REDACTED>:
> Thanks, Kostis, that fixed it.
> Very strange, though, as all my other functions have a ';' rather than a
> ',', and they all work.
> I'm changing them all to commas now.
> Thanks again!
> On 11/02/2015 07:33 PM, Kostis Sagonas wrote:
>> On 11/03/2015 02:21 AM, Michael Martin wrote:
>>> I'm a bit perplexed about this one. eunit is giving me an "unexpected
>>> success" when testing a function with guards.
>>> The source code and the output from ./rebar eu are attached.
>>> Any insight would be greatly appreciated.
>>> -spec test1(map(), binary()) -> map().
>>> test1(Data, Argument) when is_map(Data); is_binary(Argument) ->
>> You most likely want to put a ',' instead of a ';' in the guard.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions