class Test def main .testBasics .compareWithArrays .testSmallInts def testBasics t as List = List() assert t.count == 0 assert not t.count t.add('aoeu') assert t.count == 1 u as List = List() u.add(1) u.add(2) assert u.count == 2 assert u[0] == 1 assert u[1] == 2 # TODO? # v as List = List() # 'dynamic' is implied # v.add('aoeu') # v.add(1) # assert v[0].equals('aoeu') # assert v[1].equals(1) def compareWithArrays a as int[] = @[1, 2, 3] b as List = [1, 2, 3] c as List = [1, 2, 3, 4] assert a == b assert b == a assert a <> c assert c <> a def testSmallInts bytes = List() bytes.add(3) bytes.add(4 to uint8) assert bytes.count == 2 assert bytes[0] == 3 and bytes[1] == 4