aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-03-18 15:48:28 +0100
committerBjörn Gustavsson <[email protected]>2010-03-26 08:09:26 +0100
commit7832064bf7783f2f00e4e2cdc460a05d4f075146 (patch)
tree161f39d30cffac00ea78338e86cf917376426ea8 /lib/compiler/test
parentf1e60ef101b6bb6e262c2387cf1b408c66b94c31 (diff)
downloadotp-7832064bf7783f2f00e4e2cdc460a05d4f075146.tar.gz
otp-7832064bf7783f2f00e4e2cdc460a05d4f075146.tar.bz2
otp-7832064bf7783f2f00e4e2cdc460a05d4f075146.zip
compiler tests: Cope with missing args in function_clause for native code
Native-compiled code generates a different stack trace for function_clause exceptions - instead of the arguments for the function, only the arity is reported. Accept missing arguments if the test suite is native-compiled.
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/bs_match_SUITE.erl3
-rw-r--r--lib/compiler/test/lc_SUITE.erl3
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl
index 0451e7e9e2..e729367a81 100644
--- a/lib/compiler/test/bs_match_SUITE.erl
+++ b/lib/compiler/test/bs_match_SUITE.erl
@@ -978,6 +978,9 @@ fc({'EXIT',{function_clause,_}}) -> ok;
fc({'EXIT',{{case_clause,_},_}}) when ?MODULE =:= bs_match_inline_SUITE -> ok.
fc(Name, Args, {'EXIT',{function_clause,[{?MODULE,Name,Args}|_]}}) -> ok;
+fc(Name, Args, {'EXIT',{function_clause,[{?MODULE,Name,Arity}|_]}})
+ when length(Args) =:= Arity ->
+ true = test_server:is_native(?MODULE);
fc(_, Args, {'EXIT',{{case_clause,ActualArgs},_}})
when ?MODULE =:= bs_match_inline_SUITE ->
Args = tuple_to_list(ActualArgs).
diff --git a/lib/compiler/test/lc_SUITE.erl b/lib/compiler/test/lc_SUITE.erl
index 2960615b7e..0c1373924c 100644
--- a/lib/compiler/test/lc_SUITE.erl
+++ b/lib/compiler/test/lc_SUITE.erl
@@ -160,6 +160,9 @@ empty_generator(Config) when is_list(Config) ->
id(I) -> I.
fc(Args, {'EXIT',{function_clause,[{?MODULE,_,Args}|_]}}) -> ok;
+fc(Args, {'EXIT',{function_clause,[{?MODULE,Name,Arity}|_]}})
+ when length(Args) =:= Arity ->
+ true = test_server:is_native(?MODULE);
fc(Args, {'EXIT',{{case_clause,ActualArgs},_}})
when ?MODULE =:= lc_inline_SUITE ->
Args = tuple_to_list(ActualArgs).