3 -behaviour (application
).
8 %% application callbacks
9 -export ([start
/2, stop
/1]).
11 %-=====================================================================-
13 %-=====================================================================-
15 [ensure_started (App
) || App
<- [sasl
, lwes
]].
17 %-=====================================================================-
18 %- application callbacks -
19 %-=====================================================================-
20 start (_Type
, _Args
) ->
21 lwes_sup:start_link().
26 %-=====================================================================-
28 %-=====================================================================-
29 ensure_started(App
) ->
30 case application:start(App
) of
33 {error
, {already_started
, App
}} ->
37 %-=====================================================================-
39 %-=====================================================================-
41 -include_lib ("eunit/include/eunit.hrl").
45 ?
_assertEqual ([ok
, ok
],lwes_app:start()),
46 ?
_assertEqual ([ok
, ok
],lwes_app:start()),
47 ?
_assertEqual (ok
, application:stop (lwes
))