fn __test_list_pop() { var list = ['a', 'b', 'c'] Assert(SizeOf(list) is 3) AssertEq(Pop(list), 'c') Assert(SizeOf(list) is 2) AssertEq(Pop(list), 'b') Assert(SizeOf(list) is 1) AssertEq(Pop(list), 'a') Assert(SizeOf(list) is 0) } fn __test_list_get_and_set() { var list = ['xx', 'yy', 'zz'] AssertEq(list[0], 'xx') AssertEq(list[1], 'yy') AssertEq(list[2], 'zz') Assert(SizeOf(list) is 3) list[0] = 'bb' AssertEq(list[0], 'bb') AssertEq(list[1], 'yy') AssertEq(list[2], 'zz') Assert(SizeOf(list) is 3) list[1] = 55 AssertEq(list[0], 'bb') AssertEq(list[1], 55) AssertEq(list[2], 'zz') Assert(SizeOf(list) is 3) Push(list, 2.5) AssertEq(list[0], 'bb') AssertEq(list[1], 55) AssertEq(list[2], 'zz') AssertEq(list[3], 2.5) Assert(SizeOf(list) is 4) } fn __test_list_clone() { var list = [1, 2, 3] Assert(list is list) AssertEq(list, list) var clone = Clone(list) Assert(list is not clone) AssertEq(list, clone) }