[erlang-questions] eunit question

Michael Martin mmartin4242@REDACTED
Tue Nov 3 02:21:14 CET 2015


Hi all,

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.

Thanks,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.erl
Type: text/x-erlang
Size: 616 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151102/2d4897e1/attachment.bin>
-------------- next part --------------
==> test1 (eunit)
======================== EUnit ========================
module 'test1_sup'
test1: test1_test (module 'test1')...src/test1.erl:11:<0.46.0>: Argument: not_a_binary
src/test1.erl:12:<0.46.0>: Is a binary: false
*failed*
in function test1:'-test1_test/0-fun-0-'/1 (src/test1.erl, line 22)
**error:{assertException_failed,[{module,test1},
                         {line,22},
                         {expression,"test1 ( TestMap , not_a_binary )"},
                         {pattern,"{ error , function_clause , [...] }"},
                         {unexpected_success,ok}]}


module 'test1_app'
  [done in 0.001 s]
=======================================================
  Failed: 1.  Skipped: 0.  Passed: 0.
Cover analysis: /tmp/test1/.eunit/index.html

Code Coverage:
test1     : 100%
test1_app :   0%
test1_sup :   0%

Total     : 55%
ERROR: One or more eunit tests failed.
ERROR: eunit failed while processing /tmp/test1: rebar_abort


More information about the erlang-questions mailing list