[erlang-questions] eunit question

Gleb Vinogradov g.a.vinogradov@REDACTED
Tue Nov 3 03:31:09 CET 2015


Hi, Michael

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!

Gleb

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.
>>
>> Kostis
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151103/2348338e/attachment.htm>


More information about the erlang-questions mailing list