summaryrefslogtreecommitdiff
path: root/lib/tools/test
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2020-01-28 13:07:46 +0100
committerJohn Högberg <john@erlang.org>2020-01-30 10:25:09 +0100
commite09f893d02d9320ea807b13028b1b432339bc5d4 (patch)
treec6659d3fbf9d1c8483dc31343e18fb971a617887 /lib/tools/test
parent00ff50ba3135dd686e9e259a3e106b59b2e15639 (diff)
downloaderlang-e09f893d02d9320ea807b13028b1b432339bc5d4.tar.gz
xref: Allow deprecation tags to be strings
Diffstat (limited to 'lib/tools/test')
-rw-r--r--lib/tools/test/xref_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
index 66a7c2129d..d258966bc2 100644
--- a/lib/tools/test/xref_SUITE.erl
+++ b/lib/tools/test/xref_SUITE.erl
@@ -1479,12 +1479,13 @@ deprecated(Conf) when is_list(Conf) ->
Test2= <<"-module(depr).
- -export([t/0,f/1,bar/2,f/2,g/3]).
+ -export([t/0,f/1,bar/2,f/2,g/3,string/0]).
-deprecated([{'_','_',eventually}]). % DF_3
-deprecated([{f,'_',next_major_release}]). % DF_2
-deprecated([{g,'_',next_version}]). % DF_1
-deprecated([{bar,2}]). % DF
+ -deprecated([{string,0,\"hello\"}]). % DF
t() ->
g(1,2, 3),
@@ -1499,6 +1500,9 @@ deprecated(Conf) when is_list(Conf) ->
g(F, G, H) ->
?MODULE:bar(F, {G,H}).
+ string() ->
+ ?MODULE:string().
+
bar(_, _) ->
?MODULE:t().
">>,
@@ -1512,7 +1516,8 @@ deprecated(Conf) when is_list(Conf) ->
M = depr,
DFa_1 = usort([{{M,f,2},{M,g,3}}]),
DFa_2 = usort(DFa_1++[{{M,f,1},{M,f,2}},{{M,t,0},{M,f,1}}]),
- DFa_3 = usort(DFa_2++[{{M,bar,2},{M,t,0}},{{M,g,3},{M,bar,2}}]),
+ DFa_3 = usort(DFa_2++[{{M,bar,2},{M,t,0}},{{M,g,3},{M,bar,2}},
+ {{M,string,0},{M,string,0}}]),
DFa = DFa_3,
{ok,DFa} = xref:analyze(s, deprecated_function_calls),