aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2010-12-09 12:36:15 +0100
committerLukas Larsson <[email protected]>2010-12-09 12:36:15 +0100
commit9cedf681e9b3f2144cf44fbb4ae7f4a0e4aa9bf6 (patch)
treecdee7f15dfc53e8e803bceafe4b2ac45da7ac663 /lib/common_test/src
parent5f19d44a842ae4d6b1b977273308edb1131cb8d0 (diff)
downloadotp-9cedf681e9b3f2144cf44fbb4ae7f4a0e4aa9bf6.tar.gz
otp-9cedf681e9b3f2144cf44fbb4ae7f4a0e4aa9bf6.tar.bz2
otp-9cedf681e9b3f2144cf44fbb4ae7f4a0e4aa9bf6.zip
Add tests for SCB's with same id and fixed bug relating to it
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/ct_suite_callback.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_suite_callback.erl b/lib/common_test/src/ct_suite_callback.erl
index 8372303737..508d3b5bd6 100644
--- a/lib/common_test/src/ct_suite_callback.erl
+++ b/lib/common_test/src/ct_suite_callback.erl
@@ -169,8 +169,9 @@ call(Fun, Config, Meta, NoChangeRet) when is_function(Fun) ->
call([{CB, call_init, NextFun} | Rest], Config, Meta, CBs) ->
try
{Config, {NewId, _, {Mod,_State}} = NewCB} = call_init(CB, Config, Meta),
- {NewCBs, NewRest} = case proplists:get_value(NewId, CBs, NextFun) of
- undefined -> {CBs ++ [NewCB],Rest};
+ {NewCBs, NewRest} = case lists:keyfind(NewId, 1, CBs) of
+ false when NextFun == undefined ->
+ {CBs ++ [NewCB],Rest};
ExistingCB when is_tuple(ExistingCB) ->
{CBs, Rest};
_ ->