aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eunit/src/eunit_lib.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-02-03 15:33:11 +0100
committerHans Bolinder <[email protected]>2016-02-17 09:17:33 +0100
commit7113a52be93505b2db99cfa7a37160e80722a203 (patch)
treeebf6722bc00691811a003e2f77d7bda53cab78ad /lib/eunit/src/eunit_lib.erl
parent98f74d1f6f1109cbd0cbc495ed3d8630271ce8c6 (diff)
downloadotp-7113a52be93505b2db99cfa7a37160e80722a203.tar.gz
otp-7113a52be93505b2db99cfa7a37160e80722a203.tar.bz2
otp-7113a52be93505b2db99cfa7a37160e80722a203.zip
eunit: Add suppression of Dialyzer warnings
Diffstat (limited to 'lib/eunit/src/eunit_lib.erl')
-rw-r--r--lib/eunit/src/eunit_lib.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/eunit/src/eunit_lib.erl b/lib/eunit/src/eunit_lib.erl
index d8f98cffa5..4dbe023257 100644
--- a/lib/eunit/src/eunit_lib.erl
+++ b/lib/eunit/src/eunit_lib.erl
@@ -192,6 +192,7 @@ error_msg(Title, Fmt, Args) ->
io_lib:fwrite("*** ~ts ***\n~ts\n\n", [Title, Msg]).
-ifdef(TEST).
+-dialyzer({no_match, format_exception_test_/0}).
format_exception_test_() ->
[?_assertMatch(
"\nymmud:rorre"++_,
@@ -273,6 +274,7 @@ dlist_next([], Xs) ->
-ifdef(TEST).
+-dialyzer({no_match, dlist_test_/0}).
dlist_test_() ->
{"deep list traversal",
[{"non-list term -> singleton list",
@@ -338,6 +340,7 @@ is_nonempty_string([]) -> false;
is_nonempty_string(Cs) -> is_string(Cs).
-ifdef(TEST).
+-dialyzer({no_match, is_string_test_/0}).
is_string_test_() ->
{"is_string",
[{"no non-lists", ?_assert(not is_string($A))},
@@ -399,6 +402,7 @@ uniq([X | Xs]) -> [X | uniq(Xs)];
uniq([]) -> [].
-ifdef(TEST).
+-dialyzer({[no_match, no_fail_call, no_improper_lists], uniq_test_/0}).
uniq_test_() ->
{"uniq",
[?_assertError(function_clause, uniq(ok)),
@@ -459,6 +463,7 @@ normalize([]) ->
-ifdef(TEST).
+-dialyzer({no_match, cmd_test_/0}).
cmd_test_() ->
([?_test({0, "hello\n"} = ?_cmd_("echo hello"))]
++ case os:type() of
@@ -576,6 +581,7 @@ trie_match([], _T) ->
-ifdef(TEST).
+-dialyzer({no_match, trie_test_/0}).
trie_test_() ->
[{"basic representation",
[?_assert(trie_new() =:= gb_trees:empty()),