aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/maps_SUITE.erl
diff options
context:
space:
mode:
authorJesper Louis Andersen <[email protected]>2018-05-13 10:36:48 +0200
committerJesper Louis Andersen <[email protected]>2018-05-13 10:36:48 +0200
commitfefb15c576d991787d36a6d05c37cc325e418687 (patch)
treedaff0c0003d1549c0e9868adfd516c2e32b0fb50 /lib/stdlib/test/maps_SUITE.erl
parentb873e5cd6d78191d303c7c828ab7df7cd7fdf4d2 (diff)
downloadotp-fefb15c576d991787d36a6d05c37cc325e418687.tar.gz
otp-fefb15c576d991787d36a6d05c37cc325e418687.tar.bz2
otp-fefb15c576d991787d36a6d05c37cc325e418687.zip
Check for the overlap between maps and iterators
Add tests which passes on Erlang release 20.0, but have changed since then in later branches. The tests works in a "gap" between the old test cases and the new test cases in order to make it stricter what to return in this case.
Diffstat (limited to 'lib/stdlib/test/maps_SUITE.erl')
-rw-r--r--lib/stdlib/test/maps_SUITE.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stdlib/test/maps_SUITE.erl b/lib/stdlib/test/maps_SUITE.erl
index a75751b31d..6374daa1d3 100644
--- a/lib/stdlib/test/maps_SUITE.erl
+++ b/lib/stdlib/test/maps_SUITE.erl
@@ -108,6 +108,8 @@ t_without_2(_Config) ->
%% error case
?badmap(a,without,[[a,b],a]) = (catch maps:without([a,b],id(a))),
?badmap(a,without,[{a,b},a]) = (catch maps:without({a,b},id(a))),
+ ?badmap({0,<<>>,97},without,[[],{0,<<>>,97}]) = (catch maps:without([], {0,<<>>,97})),
+ ?badmap({0,<<>>,97},without,[[false, -20, -8],{0,<<>>,97}]) = (catch maps:without([false, -20, -8], {0, <<>>, 97})),
?badarg(without,[a,#{}]) = (catch maps:without(a,#{})),
ok.
@@ -120,6 +122,8 @@ t_with_2(_Config) ->
%% error case
?badmap(a,with,[[a,b],a]) = (catch maps:with([a,b],id(a))),
?badmap(a,with,[{a,b},a]) = (catch maps:with({a,b},id(a))),
+ ?badmap({0,<<>>,97},with,[[],{0,<<>>,97}]) = (catch maps:with([], {0,<<>>,97})),
+ ?badmap({0,<<>>,97},with,[[false, -20, -8],{0,<<>>,97}]) = (catch maps:with([false, -20, -8], {0, <<>>, 97})),
?badarg(with,[a,#{}]) = (catch maps:with(a,#{})),
ok.