aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_test_support.erl
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/test/ct_test_support.erl
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/test/ct_test_support.erl')
-rw-r--r--lib/common_test/test/ct_test_support.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl
index 5009741f59..981504b660 100644
--- a/lib/common_test/test/ct_test_support.erl
+++ b/lib/common_test/test/ct_test_support.erl
@@ -876,6 +876,16 @@ locate({TEH,tc_done,{undefined,undefined,{testcase_aborted,
nomatch
end;
+%% Negative matching: Given two events, the first should not be present before
+%% the other is matched.
+locate({negative,NotMatch, Match} = Neg, Node, Evs, Config) ->
+ case locate(NotMatch, Node, Evs, Config) of
+ nomatch ->
+ locate(Match, Node, Evs, Config);
+ _ ->
+ exit({found_negative_event,Neg})
+ end;
+
%% matches any event of type Name
locate({TEH,Name,Data}, Node, [{TEH,#event{name=Name,
data = EvData,
@@ -888,7 +898,7 @@ locate({TEH,Name,Data}, Node, [{TEH,#event{name=Name,
nomatch
end;
-locate({TEH,Name,Data}, Node, [_|Evs], Config) ->
+locate({_TEH,_Name,_Data}, _Node, [_|_Evs], _Config) ->
nomatch.
match_data(D,D) ->