class Test def main .testList .testNilableList .testArray .testNilableArray .testDictionary def testList t as List = List() assert 'aoeu' not in t t.add('aoeu') assert 'aoeu' in t def testNilableList t as List? = List() assert 'aoeu' not in t t.add('aoeu') assert 'aoeu' in t def testArray t as String[] = String[](2) t[0] = 'foo' t[1] = 'bar' assert 'foo' in t assert 'bar' in t assert 'baz' not in t def testNilableArray t as String[]? = String[](2) t[0] = 'foo' t[1] = 'bar' assert 'foo' in t assert 'bar' in t assert 'baz' not in t def testDictionary # There shouldn't be an "in" for dictionaries. Use d.keys or d.values to make things clear d as Dictionary = Dictionary() assert 'one' not in d.keys assert 1 not in d.values d.add('one', 1) assert 'one' in d.keys assert 1 in d.values