diff options
author | Sverker Eriksson <[email protected]> | 2015-03-05 18:32:31 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-12 19:15:32 +0100 |
commit | 494223c5e5de14c3f7a9aa8395d2d99a7faa0eca (patch) | |
tree | 75cedd87cd339d0ec0c6a0b8ac24b72b70cfbf8d /lib/debugger | |
parent | 7470adcb1255dd05cfb169929ed2dffad1f5cb32 (diff) | |
download | otp-494223c5e5de14c3f7a9aa8395d2d99a7faa0eca.tar.gz otp-494223c5e5de14c3f7a9aa8395d2d99a7faa0eca.tar.bz2 otp-494223c5e5de14c3f7a9aa8395d2d99a7faa0eca.zip |
erts: Make is_members in map_SUITE's more stringent
Diffstat (limited to 'lib/debugger')
-rw-r--r-- | lib/debugger/test/map_SUITE.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/debugger/test/map_SUITE.erl b/lib/debugger/test/map_SUITE.erl index e9b72a6088..b114d29f44 100644 --- a/lib/debugger/test/map_SUITE.erl +++ b/lib/debugger/test/map_SUITE.erl @@ -675,9 +675,13 @@ t_bif_map_put(Config) when is_list(Config) -> {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,<<>>)), ok. -is_members([],_) -> true; -is_members([K|Ks],Ls) -> - lists:member(K,Ls) andalso is_members(Ks,Ls). +is_members(Ks,Ls) when length(Ks) =/= length(Ls) -> false; +is_members(Ks,Ls) -> is_members_do(Ks,Ls). + +is_members_do([],[]) -> true; +is_members_do([],_) -> false; +is_members_do([K|Ks],Ls) -> + is_members_do(Ks, lists:delete(K,Ls)). t_bif_map_update(Config) when is_list(Config) -> |