diff options
Diffstat (limited to 'lib/debugger/test')
-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) -> |