diff options
author | Björn Gustavsson <[email protected]> | 2016-02-26 13:10:05 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-02-26 13:10:05 +0100 |
commit | 63fb22fbca8fc9b3ab118b2dc2d8d2514d926903 (patch) | |
tree | d29a0e0fe4d750f19c48a19568d3f99252ffe09e /lib/compiler/test/lc_SUITE.erl | |
parent | ad847aa2f332230ea33d6a65953c9be1f22af551 (diff) | |
parent | fc3c64711400be9eae653350213630cb8cb257f9 (diff) | |
download | otp-63fb22fbca8fc9b3ab118b2dc2d8d2514d926903.tar.gz otp-63fb22fbca8fc9b3ab118b2dc2d8d2514d926903.tar.bz2 otp-63fb22fbca8fc9b3ab118b2dc2d8d2514d926903.zip |
Merge branch 'bjorn/compiler/modernize-tests'
* bjorn/compiler/modernize-tests:
Remove ?line macros
Replace use of lists:keysearch/3 with lists:keyfind/3
Eliminate use of doc and suite clauses
Replace ?t with test_server
Replace use of test_server:format/2 with io:format/2
Eliminate use of test_server:fail/0,1
Eliminate use of ?config() macro
Modernize use of timetraps
Eliminate useless helper functions
Diffstat (limited to 'lib/compiler/test/lc_SUITE.erl')
-rw-r--r-- | lib/compiler/test/lc_SUITE.erl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/compiler/test/lc_SUITE.erl b/lib/compiler/test/lc_SUITE.erl index 43e23f3b46..70c80d3353 100644 --- a/lib/compiler/test/lc_SUITE.erl +++ b/lib/compiler/test/lc_SUITE.erl @@ -28,7 +28,9 @@ -include_lib("common_test/include/ct.hrl"). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> test_lib:recompile(?MODULE), @@ -59,12 +61,9 @@ end_per_group(_GroupName, Config) -> init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = test_server:timetrap(?t:minutes(1)), - [{watchdog,Dog}|Config]. + Config. end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), ok. basic(Config) when is_list(Config) -> @@ -171,7 +170,7 @@ no_gen_verify(Res, A, B) -> ShouldBe -> ok; _ -> io:format("A = ~p; B = ~p; Expected = ~p, actual = ~p", [A,B,ShouldBe,Res]), - ?t:fail() + ct:fail(failed) end. no_gen_eval(Fun, Res) -> |