diff options
author | Richard Carlsson <richardc@klarna.com> | 2011-09-23 22:13:23 +0200 |
---|---|---|
committer | Richard Carlsson <richardc@klarna.com> | 2011-09-25 18:19:07 +0200 |
commit | c78dae078936252a605630170b81dcd3e09382fa (patch) | |
tree | f20512811101c26aa7aabc96a360e665c020d86e /lib/eunit/src/eunit_surefire.erl | |
parent | fde5038d0304b0e6020eae134dbc6bc3b452c867 (diff) | |
download | erlang-c78dae078936252a605630170b81dcd3e09382fa.tar.gz |
removed some never-matching clauses reported by dialyzer
Diffstat (limited to 'lib/eunit/src/eunit_surefire.erl')
-rw-r--r-- | lib/eunit/src/eunit_surefire.erl | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/eunit/src/eunit_surefire.erl b/lib/eunit/src/eunit_surefire.erl index 607f0871d9..2a6cbca14d 100644 --- a/lib/eunit/src/eunit_surefire.erl +++ b/lib/eunit/src/eunit_surefire.erl @@ -56,7 +56,7 @@ { name :: chars(), description :: chars(), - result :: ok | {failed, tuple()} | {aborted, tuple()} | {skipped, tuple()}, + result :: ok | {failed, tuple()} | {aborted, tuple()} | {skipped, term()}, time :: integer(), output :: binary() }). @@ -309,7 +309,6 @@ write_testcase( output = Output}, FileDescriptor) -> DescriptionAttr = case Description of - <<>> -> []; [] -> []; _ -> [<<" description=\"">>, escape_attr(Description), <<"\"">>] end, @@ -318,7 +317,6 @@ write_testcase( <<"\" name=\"">>, escape_attr(Name), <<"\"">>, DescriptionAttr], ContentAndEndTag = case {Result, Output} of - {ok, []} -> [<<"/>">>, ?NEWLINE]; {ok, <<>>} -> [<<"/>">>, ?NEWLINE]; _ -> [<<">">>, ?NEWLINE, format_testcase_result(Result), format_testcase_output(Output), ?INDENT, <<"</testcase>">>, ?NEWLINE] end, @@ -367,7 +365,6 @@ format_testcase_result({skipped, Term}) -> %% Empty output is simply the empty string. %% Other output is inside a <system-out> xml tag. %% ---------------------------------------------------------------------------- -format_testcase_output([]) -> []; format_testcase_output(Output) -> [?INDENT, ?INDENT, <<"<system-out>">>, escape_text(Output), ?NEWLINE, ?INDENT, ?INDENT, <<"</system-out>">>, ?NEWLINE]. @@ -385,8 +382,6 @@ format_time_s([Digit1, Digit2, Digit3 | Tail]) -> [lists:reverse(Tail), $., Digi %% Escape a suite's name to generate the filename. %% Remark: we might overwrite another testsuite's file. %% ---------------------------------------------------------------------------- -escape_suitename([Head | _T] = List) when is_list(Head) -> - escape_suitename(lists:flatten(List)); escape_suitename(Binary) when is_binary(Binary) -> escape_suitename(binary_to_list(Binary)); escape_suitename("module '" ++ String) -> @@ -394,7 +389,6 @@ escape_suitename("module '" ++ String) -> escape_suitename(String) -> escape_suitename(String, []). -escape_suitename(Binary, Acc) when is_binary(Binary) -> escape_suitename(binary_to_list(Binary), Acc); escape_suitename([], Acc) -> lists:reverse(Acc); escape_suitename([$ | Tail], Acc) -> escape_suitename(Tail, [$_ | Acc]); escape_suitename([$' | Tail], Acc) -> escape_suitename(Tail, Acc); |