diff options
author | Magnus Henoch <[email protected]> | 2011-04-07 15:37:28 +0100 |
---|---|---|
committer | Magnus Henoch <[email protected]> | 2011-04-07 15:38:29 +0100 |
commit | b6decafc7a45e7519dd53d1956909463a06d3f6a (patch) | |
tree | f5b0bd460e220466662a26d1f4a3f36135a97eba /lib/eunit/src/eunit_surefire.erl | |
parent | d8dcd70f386de09109ca1f6f817a381cd1387769 (diff) | |
download | otp-b6decafc7a45e7519dd53d1956909463a06d3f6a.tar.gz otp-b6decafc7a45e7519dd53d1956909463a06d3f6a.tar.bz2 otp-b6decafc7a45e7519dd53d1956909463a06d3f6a.zip |
Increase depth of error messages in Eunit Surefire reports
Currently, error messages in Eunit Surefire reports are shortened just
like when written to a terminal. However, the space limitations that
constrain terminal output do not apply here, so it's more useful to
include more of the error message. Getting the full error message can
be particularly helpful when an assertMatch fails because of a long
and deep error term.
The new depth of 100 should be enough for most cases, while protecting
against runaway errors.
Diffstat (limited to 'lib/eunit/src/eunit_surefire.erl')
-rw-r--r-- | lib/eunit/src/eunit_surefire.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/eunit/src/eunit_surefire.erl b/lib/eunit/src/eunit_surefire.erl index eb994a990a..f289cd724a 100644 --- a/lib/eunit/src/eunit_surefire.erl +++ b/lib/eunit/src/eunit_surefire.erl @@ -323,7 +323,7 @@ write_testcase( format_testcase_result(ok) -> [<<>>]; format_testcase_result({failed, {error, {Type, _}, _} = Exception}) when is_atom(Type) -> [?INDENT, ?INDENT, <<"<failure type=\"">>, escape_attr(atom_to_list(Type)), <<"\">">>, ?NEWLINE, - <<"::">>, escape_text(eunit_lib:format_exception(Exception)), + <<"::">>, escape_text(eunit_lib:format_exception(Exception, 100)), ?INDENT, ?INDENT, <<"</failure>">>, ?NEWLINE]; format_testcase_result({failed, Term}) -> [?INDENT, ?INDENT, <<"<failure type=\"unknown\">">>, ?NEWLINE, @@ -331,7 +331,7 @@ format_testcase_result({failed, Term}) -> ?INDENT, ?INDENT, <<"</failure>">>, ?NEWLINE]; format_testcase_result({aborted, {Class, _Term, _Trace} = Exception}) when is_atom(Class) -> [?INDENT, ?INDENT, <<"<error type=\"">>, escape_attr(atom_to_list(Class)), <<"\">">>, ?NEWLINE, - <<"::">>, escape_text(eunit_lib:format_exception(Exception)), + <<"::">>, escape_text(eunit_lib:format_exception(Exception, 100)), ?INDENT, ?INDENT, <<"</error>">>, ?NEWLINE]; format_testcase_result({aborted, Term}) -> [?INDENT, ?INDENT, <<"<error type=\"unknown\">">>, ?NEWLINE, |