diff options
author | Björn Gustavsson <[email protected]> | 2012-02-07 08:42:14 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-02-07 08:42:14 +0100 |
commit | ee20527da3c90d1f7c10e7702237f9c71e23a3cd (patch) | |
tree | 66f1ddbef7c609bd955e6708e72a43da903017eb /lib/stdlib/test/sofs_SUITE.erl | |
parent | 59243ad0651d09347d2fc11cb0dbc16e9ec767ba (diff) | |
parent | d4332565d1a6480fe46fd72284e39dbf4670327e (diff) | |
download | otp-ee20527da3c90d1f7c10e7702237f9c71e23a3cd.tar.gz otp-ee20527da3c90d1f7c10e7702237f9c71e23a3cd.tar.bz2 otp-ee20527da3c90d1f7c10e7702237f9c71e23a3cd.zip |
Merge branch 'maint'
* maint:
erlang.xml: Fix a few typos and grammatical errors
debugger tests: Increase time trap timeout
fprof_SUITE: Skip create_file_slow/1 if libraries are native
etop_SUITE: Skip a test case if libraries are native-compiled
Skip all inviso test cases if libraries are native-compiled
erl_prim_loader_SUITE: Handle native-compiled erl_boot_server
re_SUITE: Skip error_handling/1 if 're' is native code
shell_SUITE: Handle different EXIT reasons from native code
sofs_SUITE: Handle different EXIT reasons from native code
erl_eval_SUITE: Skip test of parameterized modules if native code
trace_port_SUITE: Skip test cases if 'lists' is native-compiled
call_trace_SUITE: Skip test cases if libraries are native-compiled
Diffstat (limited to 'lib/stdlib/test/sofs_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/sofs_SUITE.erl | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/stdlib/test/sofs_SUITE.erl b/lib/stdlib/test/sofs_SUITE.erl index 73b282149a..c8dca9a6e6 100644 --- a/lib/stdlib/test/sofs_SUITE.erl +++ b/lib/stdlib/test/sofs_SUITE.erl @@ -1879,12 +1879,9 @@ digraph(Conf) when is_list(Conf) -> ?line {'EXIT', {badarg, _}} = (catch family_to_digraph(set([a]))), - ?line {'EXIT', {badarg, [{sofs,family_to_digraph,[_,_],_}|_]}} = - (catch family_to_digraph(set([a]), [foo])), - ?line {'EXIT', {badarg, [{sofs,family_to_digraph,[_,_],_}|_]}} = - (catch family_to_digraph(F, [foo])), - ?line {'EXIT', {cyclic, [{sofs,family_to_digraph,[_,_],_}|_]}} = - (catch family_to_digraph(family([{a,[a]}]),[acyclic])), + digraph_fail(badarg, catch family_to_digraph(set([a]), [foo])), + digraph_fail(badarg, catch family_to_digraph(F, [foo])), + digraph_fail(cyclic, catch family_to_digraph(family([{a,[a]}]),[acyclic])), ?line G1 = family_to_digraph(E), ?line {'EXIT', {badarg, _}} = (catch digraph_to_family(G1, foo)), @@ -1927,6 +1924,13 @@ digraph(Conf) when is_list(Conf) -> ?line true = T0 == ets:all(), ok. +digraph_fail(ExitReason, Fail) -> + {'EXIT', {ExitReason, [{sofs,family_to_digraph,A,_}|_]}} = Fail, + case {test_server:is_native(sofs),A} of + {false,[_,_]} -> ok; + {true,2} -> ok + end. + constant_function(suite) -> []; constant_function(doc) -> [""]; constant_function(Conf) when is_list(Conf) -> @@ -1954,6 +1958,17 @@ misc(Conf) when is_list(Conf) -> difference(S, RR)), %% The function external:foo/1 is undefined. + case test_server:is_native(sofs) of + true -> + %% Create an export entry for external:foo/1 to work + %% around a bug in the native code. If there is no + %% export entry, the exception will be + %% {badfun,{external,foo}}. Remove in R16 when tuple + %% funs are removed. + (catch external:foo([])); + false -> + ok + end, ?line {'EXIT', {undef, _}} = (catch projection({external,foo}, set([a,b,c]))), ok. |