[erlang-questions] Probably a dumb eunit question

Rudolph van Graan rvg.mailing@REDACTED
Mon Oct 1 12:40:19 CEST 2012


I have one test case that fails because something it calls crashes. I see this output after running the test:

======================== EUnit ========================
*failed*
::undef
=======================================================
  Failed: 1.  Skipped: 0.  Passed: 0.


I know WHY it fails. The test consists of this single line of code:

 ?assertMatch(ok,my_app:install()),

If I change the assertMatch to assertError, I get the real reason for the crash:

*failed*
::{assertException_failed,
    [{module,cache_tests},
     {line,45},
     {expression,"app : install ( )"},
     {pattern,"{ error , ok , [...] }"},
     {unexpected_exception,
         {error,undef,
             [{util,get_value,[frag_properties,[{...}|...]],[]},
              {app,'-install/2-fun-0-',4,[{...}|...]},
              {lists,foldl,3,[...]},
              {app,install,2,...},
              {cache_tests,'-start_stop/0-fun-0-',...},
              {cache_tests,...},
              {...}|...]}}]}

My question is... what am I doing wrong so that I don't get the crash stack and details when I just use assertMatch(...) ?

Thanks,

R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121001/7d5a37b4/attachment.htm>


More information about the erlang-questions mailing list