summaryrefslogtreecommitdiff
path: root/lib/stdlib/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl21
1 files changed, 16 insertions, 5 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 64009a5273..605f301d05 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -2301,13 +2301,19 @@ update_element_do(Tab,Tuple,Key,UpdPos) ->
Big32 = 16#12345678,
Big64 = 16#123456789abcdef0,
- Values = { 623, -27, 0, Big32, -Big32, Big64, -Big64, Big32*Big32,
+ RefcBin = list_to_binary(lists:seq(1,100)),
+ BigMap1 = maps:from_list([{N,N} || N <- lists:seq(1,33)]),
+ BigMap2 = BigMap1#{key => RefcBin, RefcBin => value},
+ Values = { 623, -27, Big32, -Big32, Big64, -Big64, Big32*Big32,
-Big32*Big32, Big32*Big64, -Big32*Big64, Big64*Big64, -Big64*Big64,
"A", "Sverker", [], {12,-132}, {},
- <<45,232,0,12,133>>, <<234,12,23>>, list_to_binary(lists:seq(1,100)),
+ <<45,232,0,12,133>>, <<234,12,23>>, RefcBin,
(fun(X) -> X*Big32 end),
- make_ref(), make_ref(), self(), ok, update_element, 28, 29 },
- Length = size(Values),
+ make_ref(), make_ref(), self(), ok, update_element,
+ #{a => value, "hello" => "world", 1.0 => RefcBin },
+ BigMap1, BigMap2},
+ Length = tuple_size(Values),
+ 29 = Length,
PosValArgF = fun(ToIx, ResList, [Pos | PosTail], Rand, MeF) ->
NextIx = (ToIx+Rand) rem Length,
@@ -2327,7 +2333,12 @@ update_element_do(Tab,Tuple,Key,UpdPos) ->
true = ets:update_element(Tab, Key, PosValArg),
ArgHash = erlang:phash2({Tab,Key,PosValArg}),
NewTuple = update_tuple(PosValArg,Tuple),
- [NewTuple] = ets:lookup(Tab,Key)
+ [NewTuple] = ets:lookup(Tab,Key),
+ [begin
+ Elem = element(I, NewTuple),
+ Elem = ets:lookup_element(Tab, Key, I)
+ end
+ || I <- lists:seq(1, tuple_size(NewTuple))]
end,
LoopF = fun(_FromIx, Incr, _Times, Checksum, _MeF) when Incr >= Length ->