michael@0: import WebIDL michael@0: michael@0: def WebIDLTest(parser, harness): michael@0: parser.parse(""" michael@0: interface Foo; michael@0: interface Bar; michael@0: interface Foo; michael@0: """); michael@0: michael@0: results = parser.finish() michael@0: michael@0: # There should be no duplicate interfaces in the result. michael@0: expectedNames = sorted(['Foo', 'Bar']) michael@0: actualNames = sorted(map(lambda iface: iface.identifier.name, results)) michael@0: harness.check(actualNames, expectedNames, "Parser shouldn't output duplicate names.")