aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-08-29 17:15:23 +0200
committerHenrik Nord <[email protected]>2011-08-29 17:21:47 +0200
commit7f5f7b08a8f0ed55126192beaed9d748f14c8f0a (patch)
treea35f7ab30a0e1a18664c1fd0e3adea281d152396 /lib/common_test
parentf94beb7788106a85a02bebcd6362a170248fa659 (diff)
parent7d8a1f8b944d6734d9419f184c441899a48c11a3 (diff)
downloadotp-7f5f7b08a8f0ed55126192beaed9d748f14c8f0a.tar.gz
otp-7f5f7b08a8f0ed55126192beaed9d748f14c8f0a.tar.bz2
otp-7f5f7b08a8f0ed55126192beaed9d748f14c8f0a.zip
Merge branch 'rz/add_proplist_type' into dev
* rz/add_proplist_type: Add a proplist() type OTP-9499
Diffstat (limited to 'lib/common_test')
-rw-r--r--lib/common_test/src/ct_hooks.erl6
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl7
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index 984e04b90f..ece592e320 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -31,8 +31,6 @@
-export([on_tc_skip/2]).
-export([on_tc_fail/2]).
--type proplist() :: [{atom(),term()}].
-
%% If you change this, remember to update ct_util:look -> stop clause as well.
-define(config_name, ct_hooks).
@@ -59,7 +57,7 @@ terminate(Hooks) ->
%% @doc Called as each test case is started. This includes all configuration
%% tests.
-spec init_tc(Mod :: atom(), Func :: atom(), Args :: list()) ->
- NewConfig :: proplist() |
+ NewConfig :: proplists:proplist() |
{skip, Reason :: term()} |
{auto_skip, Reason :: term()} |
{fail, Reason :: term()}.
@@ -92,7 +90,7 @@ init_tc(_Mod, TC, Config) ->
Args :: list(),
Result :: term(),
Resturn :: term()) ->
- NewConfig :: proplist() |
+ NewConfig :: proplists:proplist() |
{skip, Reason :: term()} |
{auto_skip, Reason :: term()} |
{fail, Reason :: term()} |
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
index ebebfd18a9..71ed61b4c0 100644
--- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
@@ -59,8 +59,7 @@
-include_lib("common_test/src/ct_util.hrl").
-include_lib("common_test/include/ct_event.hrl").
--type proplist() :: list({atom(),term()}).
--type config() :: proplist().
+-type config() :: proplists:proplist().
-type reason() :: term().
-type skip_or_fail() :: {skip, reason()} |
{auto_skip, reason()} |
@@ -71,7 +70,7 @@
%% @doc Always called before any other callback function. Use this to initiate
%% any common state. It should return an state for this CTH.
--spec init(Id :: term(), Opts :: proplist()) ->
+-spec init(Id :: term(), Opts :: proplists:proplist()) ->
State :: #state{}.
init(Id, Opts) ->
gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),
@@ -81,7 +80,7 @@ init(Id, Opts) ->
%% @doc The ID is used to uniquly identify an CTH instance, if two CTH's
%% return the same ID the seconds CTH is ignored. This function should NOT
%% have any side effects as it might be called multiple times by common test.
--spec id(Opts :: proplist()) ->
+-spec id(Opts :: proplists:proplist()) ->
Id :: term().
id(Opts) ->
gen_event:notify(?CT_EVMGR_REF, #event{ name = cth, node = node(),