forked from cybergrind/rebar-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eunit.erl
35 lines (28 loc) · 1.1 KB
/
eunit.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%%%-------------------------------------------------------------------
%%% @author {{author_name}} <{{author_email}}>
%%% @copyright (C) {{copyright_year}}, {{copyright_owner}}
%%% @doc
%%% EUnit test suite module {{name}}.
%%% @end
%%% Created : {{now_ts}} by {{author_name}} <{{author_email}}>
%%%-------------------------------------------------------------------
-module({{name}}_tests).
-author('{{author_name}} <{{author_email}}>').
-define(NOTEST, true).
-define(NOASSERT, true).
-include_lib("eunit/include/eunit.hrl").
-define(MODNAME, {{name}}).
-spec {{name}}_test_() -> List
where
List = [term()]
{{name}}_test_() ->
%% add your asserts in the returned list, e.g.:
[
%% ?assert(?MODNAME:double(2) =:= 4),
%% ?assertMatch({ok, Pid}, ?MODNAME:spawn_link()),
%% ?assertEqual("ba", ?MODNAME:reverse("ab")),
%% ?assertError(badarith, ?MODNAME:divide(X, 0)),
%% ?assertExit(normal, ?MODNAME:exit(normal)),
%% ?assertThrow({not_found, _}, ?MODNAME:func(unknown_object))
].
%%% vim: set filetype=erlang tabstop=4 foldmarker=%%%',%%%. foldmethod=marker: