From c6ab60dbfc6da7b4f800c9e40893c8b58413960c Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Thu, 28 Aug 2014 09:34:23 -0600 Subject: Cargoify servo --- .../parser/tests/test_duplicate_qualifiers.py | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py (limited to 'components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py') diff --git a/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py b/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py new file mode 100644 index 00000000000..799f2e0e0ed --- /dev/null +++ b/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py @@ -0,0 +1,84 @@ +def WebIDLTest(parser, harness): + threw = False + try: + parser.parse(""" + interface DuplicateQualifiers1 { + getter getter byte foo(unsigned long index); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface DuplicateQualifiers2 { + setter setter byte foo(unsigned long index, byte value); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface DuplicateQualifiers3 { + creator creator byte foo(unsigned long index, byte value); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface DuplicateQualifiers4 { + deleter deleter byte foo(unsigned long index); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + parser.parse(""" + interface DuplicateQualifiers5 { + getter deleter getter byte foo(unsigned long index); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") + + threw = False + try: + results = parser.parse(""" + interface DuplicateQualifiers6 { + creator setter creator byte foo(unsigned long index, byte value); + }; + """) + + results = parser.finish() + except: + threw = True + + harness.ok(threw, "Should have thrown.") -- cgit v1.2.3