aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-08-10 11:25:58 +0200
committerLukas Larsson <[email protected]>2011-08-31 10:33:11 +0200
commitdbdb513949886060a6981359e73fbcb4748fd15a (patch)
treeb34e9179f449c7403b11c28337481aa8953d601f
parent45942fb2f521ae7e043987eedc0d6197ba7b55b0 (diff)
downloadotp-dbdb513949886060a6981359e73fbcb4748fd15a.tar.gz
otp-dbdb513949886060a6981359e73fbcb4748fd15a.tar.bz2
otp-dbdb513949886060a6981359e73fbcb4748fd15a.zip
Add a high value to test data to catch type cast truncation errors
-rw-r--r--lib/stdlib/test/ets_SUITE.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 9341300f90..3ac6da3d28 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -2717,7 +2717,8 @@ ordered_do(Opts) ->
9,10,11,12,
1,2,3,4,
17,18,19,20,
- 13,14,15,16
+ 13,14,15,16,
+ 1 bsl 33
],
?line lists:foreach(fun(X) ->
ets:insert(T,{X,integer_to_list(X)})
@@ -2732,13 +2733,14 @@ ordered_do(Opts) ->
?line S2 = L2,
?line [{1,"1"}] = ets:slot(T,0),
?line [{28,"28"}] = ets:slot(T,27),
+ ?line [{1 bsl 33,_}] = ets:slot(T,28),
?line 27 = ets:prev(T,28),
?line [{7,"7"}] = ets:slot(T,6),
- ?line '$end_of_table' = ets:next(T,28),
+ ?line '$end_of_table' = ets:next(T,1 bsl 33),
?line [{12,"12"}] = ets:slot(T,11),
- ?line '$end_of_table' = ets:slot(T,28),
+ ?line '$end_of_table' = ets:slot(T,29),
?line [{1,"1"}] = ets:slot(T,0),
- ?line 28 = ets:prev(T,29),
+ ?line 28 = ets:prev(T,1 bsl 33),
?line 1 = ets:next(T,0),
?line pick_all_forward(T),
?line [{7,"7"}] = ets:slot(T,6),