aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-02-12 14:19:28 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-02-12 14:19:28 +0100
commitf6d12d4b4ebce206c637ecadfaa3ec46e52b0383 (patch)
tree36bc2123d1e2e0b7ae425b9a63161df51b3a7dd6 /lib/stdlib/test
parentd7d240bc3d03cf708f6feaf20efac1addcd76242 (diff)
parentd96507bfc77728a5ba2a96be34f2c90178fe8a56 (diff)
downloadotp-f6d12d4b4ebce206c637ecadfaa3ec46e52b0383.tar.gz
otp-f6d12d4b4ebce206c637ecadfaa3ec46e52b0383.tar.bz2
otp-f6d12d4b4ebce206c637ecadfaa3ec46e52b0383.zip
Merge branch 'nox/maps-improve-erl_eval'
* nox/maps-improve-erl_eval: Handle map fields in their own function in erl_eval
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/erl_eval_SUITE.erl19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/stdlib/test/erl_eval_SUITE.erl b/lib/stdlib/test/erl_eval_SUITE.erl
index c4b6b35e72..b194c7cb41 100644
--- a/lib/stdlib/test/erl_eval_SUITE.erl
+++ b/lib/stdlib/test/erl_eval_SUITE.erl
@@ -42,7 +42,8 @@
try_catch/1,
eval_expr_5/1,
zero_width/1,
- eep37/1]).
+ eep37/1,
+ eep43/1]).
%%
%% Define to run outside of test server
@@ -82,7 +83,7 @@ all() ->
simple_cases, unary_plus, apply_atom, otp_5269,
otp_6539, otp_6543, otp_6787, otp_6977, otp_7550,
otp_8133, otp_10622, funs, try_catch, eval_expr_5, zero_width,
- eep37].
+ eep37, eep43].
groups() ->
[].
@@ -1424,6 +1425,20 @@ eep37(Config) when is_list(Config) ->
720),
ok.
+eep43(Config) when is_list(Config) ->
+ check(fun () -> #{} end, " #{}.", #{}),
+ check(fun () -> #{a => b} end, "#{a => b}.", #{a => b}),
+ check(fun () ->
+ Map = #{a => b},
+ {Map#{a := b},Map#{a => c},Map#{d => e}}
+ end,
+ "begin "
+ " Map = #{a => B=b}, "
+ " {Map#{a := B},Map#{a => c},Map#{d => e}} "
+ "end.",
+ {#{a => b},#{a => c},#{a => b,d => e}}),
+ ok.
+
%% Check the string in different contexts: as is; in fun; from compiled code.
check(F, String, Result) ->
check1(F, String, Result),