Fix shrinking list capacity.

This commit is contained in:
Bob Nystrom
2014-02-10 07:55:14 -08:00
parent 1b4582fec3
commit ec7e159017
2 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1,11 @@
// This mostly tests that lists handle growing and shrinking their memory.
var list = []
for (i in 0..200) {
list.add(i)
}
for (i in 0..195) {
list.removeAt(-1)
}
IO.print(list) // expect: [0, 1, 2, 3, 4]