diff options
author | Lukas Larsson <[email protected]> | 2018-06-11 15:14:30 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-06-11 15:14:30 +0200 |
commit | a221bb53d41de10f5fcf3d5d6c0174af702c3cce (patch) | |
tree | d0468b9f989b17fe86f847b29f1bbcf7184abbcc /lib/stdlib/test | |
parent | e1d7d2d501bd1d28a3c0962d9230147503e3a1c8 (diff) | |
parent | 51f630ebd4ac92780c28748afc427c90e97d88d3 (diff) | |
download | otp-a221bb53d41de10f5fcf3d5d6c0174af702c3cce.tar.gz otp-a221bb53d41de10f5fcf3d5d6c0174af702c3cce.tar.bz2 otp-a221bb53d41de10f5fcf3d5d6c0174af702c3cce.zip |
Merge branch 'jl/sharpen-maps-tests/OTP-14012'
* jl/sharpen-maps-tests/OTP-14012:
stdlib: Fix error reason for maps:with/without
Check for the overlap between maps and iterators
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/maps_SUITE.erl | 4 |
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. |