diff options
author | Björn Gustavsson <[email protected]> | 2016-03-10 09:57:37 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-10 09:57:37 +0100 |
commit | e42208ce5d5e76056f9c199d52512275c98b50c1 (patch) | |
tree | 016d43ebe0fa7f0fb7dd2bcab9398dc418a4b665 /lib/stdlib/test/id_transform_SUITE.erl | |
parent | 104cca3be8852070cb3c6d5b12ea74fe1591ba9b (diff) | |
parent | 25e64aaf1df1ea5c712075a9236367de4cc81359 (diff) | |
download | otp-e42208ce5d5e76056f9c199d52512275c98b50c1.tar.gz otp-e42208ce5d5e76056f9c199d52512275c98b50c1.tar.bz2 otp-e42208ce5d5e76056f9c199d52512275c98b50c1.zip |
Merge branch 'bjorn/stdlib/modernize-tests'
* bjorn/stdlib/modernize-tests:
Eliminate use of ?config() macro
Remove ?line macros
Replace "%" with "%%" at the beginning of a line
Eliminate 'suite' and 'doc' clauses
gen_server_SUITE: Eliminate use of test_server:timecall/3
Use 'test_server' instead of ?t macro
Eliminate use of test_server:messages_get/0
sys_SUITE: Replace test_server:capture*/0 with ct:capture*/0
sys_SUITE: Mend test cases that didn't test what they should
Replace calls to test_server:sleep/1 with ct:sleep/1 or timer:sleep/1
Eliminate use of test_server:do_times()
Replace use of test_server:format/2 with io:format/2
Eliminate use of test_server:fail/0,1
Modernize use of timetraps
Diffstat (limited to 'lib/stdlib/test/id_transform_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/id_transform_SUITE.erl | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/stdlib/test/id_transform_SUITE.erl b/lib/stdlib/test/id_transform_SUITE.erl index a0c3c9317a..aaa6a758d5 100644 --- a/lib/stdlib/test/id_transform_SUITE.erl +++ b/lib/stdlib/test/id_transform_SUITE.erl @@ -29,11 +29,12 @@ -export([check/2,check2/1,g/0,f/1,t/1,t1/1,t2/1,t3/1,t4/1, t5/1,apa/1,new_fun/0]). - % Serves as test... +%% Serves as test... -hej(hopp). -include_lib("common_test/include/ct.hrl"). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}]. all() -> [id_transform]. @@ -54,7 +55,7 @@ end_per_group(_GroupName, Config) -> Config. -id_transform(doc) -> "Test erl_id_trans."; +%% Test erl_id_trans. id_transform(Config) when is_list(Config) -> File = filename:join([code:lib_dir(stdlib),"examples", "erl_id_trans.erl"]), @@ -62,10 +63,8 @@ id_transform(Config) when is_list(Config) -> {module,erl_id_trans} = code:load_binary(erl_id_trans, File, Bin), case test_server:purify_is_running() of false -> - Dog = ct:timetrap(?t:hours(1)), - Res = run_in_test_suite(), - ?t:timetrap_cancel(Dog), - Res; + ct:timetrap({hours,1}), + run_in_test_suite(); true -> {skip,"Valgrind (too slow)"} end. @@ -139,9 +138,9 @@ do_trans_1(File, Tree0) -> {failed,{File,{transform,{unknown,Else}}}} end. -% From here on there's only fake code to serve as test cases -% for the id_transform. -% They need to be exported. +%% From here on there's only fake code to serve as test cases +%% for the id_transform. +%% They need to be exported. check(X,_Y) when X -> true; @@ -192,7 +191,7 @@ f(X) -> nok end. -% Stolen from erl_lint_SUITE.erl +%% Stolen from erl_lint_SUITE.erl -record(apa, {}). t(A) when atom(A) -> |