aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-02-04 17:57:55 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-02-07 16:17:15 +0100
commitd2c8aaef5917101c29f055cd235e604a5d9d728b (patch)
tree07242cb19f1673da6965aad040d303a2c2cfdab0 /erts
parent665d708cf6804d552a07d294317e2c10443b5a62 (diff)
downloadotp-d2c8aaef5917101c29f055cd235e604a5d9d728b.tar.gz
otp-d2c8aaef5917101c29f055cd235e604a5d9d728b.tar.bz2
otp-d2c8aaef5917101c29f055cd235e604a5d9d728b.zip
erts,compiler: Correct and amend tests for Maps
Faulty test for maps update
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/test/map_SUITE.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/erts/emulator/test/map_SUITE.erl b/erts/emulator/test/map_SUITE.erl
index 31c1486f1c..8cc5621181 100644
--- a/erts/emulator/test/map_SUITE.erl
+++ b/erts/emulator/test/map_SUITE.erl
@@ -254,7 +254,15 @@ t_update_exact(Config) when is_list(Config) ->
M2 = M0#{3.0:=new},
#{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
M2 = M0#{3.0=>wrong,3.0:=new},
- M2 = M0#{3=>wrong,3.0:=new},
+ true = M2 =/= M0#{3=>right,3.0:=new},
+ #{ 3 := right, 3.0 := new } = M0#{3=>right,3.0:=new},
+
+ M3 = id(#{ 1 => val}),
+ #{1 := update2,1.0 := new_val4} = M3#{
+ 1.0 => new_val1, 1 := update, 1=> update3,
+ 1 := update2, 1.0 := new_val2, 1.0 => new_val3,
+ 1.0 => new_val4 },
+
%% Errors cases.
{'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),