aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-01-29 13:05:34 +0100
committerBjörn Gustavsson <[email protected]>2013-01-31 11:14:48 +0100
commitc7f54483cb9e6e20baabdea365efbeda7569c62b (patch)
treef78e0cd4b3e349090a1c20dfebda575b4d5cbd46 /lib/stdlib
parent006d33717a9dea83fc918002d36f7d0527e71970 (diff)
downloadotp-c7f54483cb9e6e20baabdea365efbeda7569c62b.tar.gz
otp-c7f54483cb9e6e20baabdea365efbeda7569c62b.tar.bz2
otp-c7f54483cb9e6e20baabdea365efbeda7569c62b.zip
Test calling deprecated or removed functions
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index c8725411ee..36229b6989 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -1909,9 +1909,23 @@ otp_5362(Config) when is_list(Config) ->
warn_deprecated_function,
warn_bif_clash]},
{errors,
- [{2,erl_lint,disallowed_nowarn_bif_clash}],[]}}
+ [{2,erl_lint,disallowed_nowarn_bif_clash}],[]}},
- ],
+ {call_deprecated_function,
+ <<"t(X) -> erlang:hash(X, 2000).">>,
+ [],
+ {warnings,
+ [{1,erl_lint,{deprecated,{erlang,hash,2},
+ {erlang,phash2,2},"in a future release"}}]}},
+
+ {call_removed_function,
+ <<"t(X) -> regexp:match(X).">>,
+ [],
+ {warnings,
+ [{1,erl_lint,{removed,{regexp,match,1},
+ "removed in R15; use the re module instead"}}]}}
+
+ ],
?line [] = run(Config, Ts),
ok.