From 5442482f21e3e97652197c3148fa76ec3adb2330 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Mon, 25 Sep 2023 16:46:19 +0200 Subject: [PATCH] guarded tests against array indices larger than ints --- src/org/rascalmpl/library/lang/rascal/tests/basic/Lists.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/rascalmpl/library/lang/rascal/tests/basic/Lists.rsc b/src/org/rascalmpl/library/lang/rascal/tests/basic/Lists.rsc index 9aea9e1134e..deda66b7cc2 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/basic/Lists.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/basic/Lists.rsc @@ -185,7 +185,7 @@ test bool sliceFirstSecond(list[int] L) { return L[f, f + incr..] == makeSlice(L, f, f + incr, size(L)); } -test bool sliceEmpty(int from, int to) = [][from..to] == []; +test bool sliceEmpty(int from, int to) = [][from % 32768 .. to % 32768] == []; test bool sliceOverEnd() = [0][1..] == [];