Skip to content

Commit

Permalink
guarded tests against array indices larger than ints
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Sep 25, 2023
1 parent 8315fbc commit 5442482
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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..] == [];

Expand Down

0 comments on commit 5442482

Please sign in to comment.