diff options
author | Björn Gustavsson <[email protected]> | 2010-03-18 13:51:28 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-03-26 08:09:26 +0100 |
commit | f1e60ef101b6bb6e262c2387cf1b408c66b94c31 (patch) | |
tree | a0ff680fb454970229598c875cdc36be7abb53d3 /lib/compiler/test/guard_SUITE.erl | |
parent | 0320836d1b58438ef4467832b00306672d22f8d6 (diff) | |
download | otp-f1e60ef101b6bb6e262c2387cf1b408c66b94c31.tar.gz otp-f1e60ef101b6bb6e262c2387cf1b408c66b94c31.tar.bz2 otp-f1e60ef101b6bb6e262c2387cf1b408c66b94c31.zip |
compiler tests: Compile a few more modules with 'inline'
Since a function_clause exception in an inlined function will
be changed to a case_clause exception, we must test for both.
Diffstat (limited to 'lib/compiler/test/guard_SUITE.erl')
-rw-r--r-- | lib/compiler/test/guard_SUITE.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl index 5ae41f13e7..7343d0f8ca 100644 --- a/lib/compiler/test/guard_SUITE.erl +++ b/lib/compiler/test/guard_SUITE.erl @@ -1316,11 +1316,11 @@ cqlc(M, F, As, St) -> andalso_semi(Config) when is_list(Config) -> ?line ok = andalso_semi_foo(0), ?line ok = andalso_semi_foo(1), - ?line {'EXIT',{function_clause,_}} = (catch andalso_semi_foo(2)), + ?line fc(catch andalso_semi_foo(2)), ?line ok = andalso_semi_bar([a,b,c]), ?line ok = andalso_semi_bar(1), - ?line {'EXIT',{function_clause,_}} = (catch andalso_semi_bar([a,b])), + ?line fc(catch andalso_semi_bar([a,b])), ok. andalso_semi_foo(Bar) when is_integer(Bar) andalso Bar =:= 0; Bar =:= 1 -> @@ -1332,8 +1332,8 @@ andalso_semi_bar(Bar) when is_list(Bar) andalso length(Bar) =:= 3; Bar =:= 1 -> tuple_size(Config) when is_list(Config) -> ?line 10 = do_tuple_size({1,2,3,4}), - ?line {'EXIT',{function_clause,_}} = (catch do_tuple_size({1,2,3})), - ?line {'EXIT',{function_clause,_}} = (catch do_tuple_size(42)), + ?line fc(catch do_tuple_size({1,2,3})), + ?line fc(catch do_tuple_size(42)), ?line error = ludicrous_tuple_size({a,b,c}), ?line error = ludicrous_tuple_size([a,b,c]), @@ -1374,3 +1374,6 @@ check(F, Result) -> io:format(" Got: ~p\n", [Other]), test_server:fail() end. + +fc({'EXIT',{function_clause,_}}) -> ok; +fc({'EXIT',{{case_clause,_},_}}) when ?MODULE =:= guard_inline_SUITE -> ok. |