aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eunit/src/eunit_serial.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_serial.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_serial.erl')
-rw-r--r--lib/eunit/src/eunit_serial.erl18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/eunit/src/eunit_serial.erl b/lib/eunit/src/eunit_serial.erl
index 1a0179a5df..da76064a53 100644
--- a/lib/eunit/src/eunit_serial.erl
+++ b/lib/eunit/src/eunit_serial.erl
@@ -61,14 +61,16 @@
messages = dict:new() :: dict:dict()}).
start(Pids) ->
- spawn(fun () -> serializer(Pids) end).
-
-serializer(Pids) ->
- St = #state{listeners = sets:from_list(Pids),
- cancelled = eunit_lib:trie_new(),
- messages = dict:new()},
- expect([], undefined, 0, St),
- exit(normal).
+ spawn(serializer_fun(Pids)).
+
+serializer_fun(Pids) ->
+ fun () ->
+ St = #state{listeners = sets:from_list(Pids),
+ cancelled = eunit_lib:trie_new(),
+ messages = dict:new()},
+ expect([], undefined, 0, St),
+ exit(normal)
+ end.
%% collect beginning and end of an expected item; return {Done, NewSt}
%% where Done is true if there are no more items of this group