aboutsummaryrefslogblamecommitdiffstats
path: root/lib/tools/test/cover_SUITE_data/b.erl
blob: 0a418a58d800f78855490df6318289d44c4a0ec4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
           
                                   











                             





                                                      
-module(b).
-export([start/0, loop/0, wait/0]).

start() ->
    spawn(?MODULE, loop, []).

loop() ->
    receive
	{ping, Ping} ->
	    a:pong(Ping),
	    loop();
	stop ->
	    done
    end.

%% This checks for a bug in expressions which have no
%% "main" clauses (only after and friends) followed by
%% a return value in the same line.
wait() ->
    receive after 1000 -> done end, ok.