aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/id_transform_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/test/id_transform_SUITE.erl')
-rw-r--r--lib/stdlib/test/id_transform_SUITE.erl27
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/stdlib/test/id_transform_SUITE.erl b/lib/stdlib/test/id_transform_SUITE.erl
index 1cff990697..0addf09461 100644
--- a/lib/stdlib/test/id_transform_SUITE.erl
+++ b/lib/stdlib/test/id_transform_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2018. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -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("test_server/include/test_server.hrl").
+-include_lib("common_test/include/ct.hrl").
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]}].
all() ->
[id_transform].
@@ -54,18 +55,16 @@ 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"]),
{ok,erl_id_trans,Bin} = compile:file(File,[binary]),
{module,erl_id_trans} = code:load_binary(erl_id_trans, File, Bin),
- case test_server:purify_is_running() of
+ case test_server:is_valgrind() 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) ->