aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-08-22 18:11:48 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-08-22 18:12:29 +0200
commitdb2f7bc3392196509a3c5a9e19f78f8bf6b30e2c (patch)
tree0f99e5cb2b1bde02ef6585cd905458e87a168bf3 /lib
parente3b751ca3d310e4902a2e882645942a0a8529374 (diff)
downloadotp-db2f7bc3392196509a3c5a9e19f78f8bf6b30e2c.tar.gz
otp-db2f7bc3392196509a3c5a9e19f78f8bf6b30e2c.tar.bz2
otp-db2f7bc3392196509a3c5a9e19f78f8bf6b30e2c.zip
stdlib: Update Map tests
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index ea61b2082b..b0fe88e21c 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -3398,7 +3398,8 @@ maps(Config) ->
g := 1 + 1,
h := _,
i := (_X = _Y),
- j := (x ! y) }) ->
+ j := (x ! y),
+ <<0:300>> := 33}) ->
{A,F}.
">>,
[],
@@ -3411,9 +3412,10 @@ maps(Config) ->
{errors,[{1,erl_lint,illegal_map_construction},
{1,erl_lint,{unbound_var,'X'}}],
[]}},
- {errors_in_map_keys,
+ {legal_map_construction,
<<"t(V) -> #{ a => 1,
#{a=>V} => 2,
+ #{{a,V}=>V} => 2,
#{ \"hi\" => wazzup, hi => ho } => yep,
[try a catch _:_ -> b end] => nope,
ok => 1.0,
@@ -3425,11 +3427,7 @@ maps(Config) ->
}.
">>,
[],
- {errors,[{2,erl_lint,{illegal_map_key_variable,'V'}},
- {4,erl_lint,illegal_map_key},
- {6,erl_lint,illegal_map_key},
- {8,erl_lint,illegal_map_key},
- {10,erl_lint,illegal_map_key}],[]}},
+ []},
{errors_in_map_keys_pattern,
<<"t(#{ a := 2,
#{} := A,
@@ -3440,8 +3438,8 @@ maps(Config) ->
A.
">>,
[],
- {errors,[{4,erl_lint,illegal_map_key},
- {6,erl_lint,{illegal_map_key_variable,'V'}}],[]}}],
+ {errors,[{4,erl_lint,illegal_map_construction},
+ {6,erl_lint,illegal_map_key}],[]}}],
[] = run(Config, Ts),
ok.