diff options
Diffstat (limited to 'dom/bindings/parser/tests/test_typedef_identifier_conflict.py')
-rw-r--r-- | dom/bindings/parser/tests/test_typedef_identifier_conflict.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/bindings/parser/tests/test_typedef_identifier_conflict.py b/dom/bindings/parser/tests/test_typedef_identifier_conflict.py new file mode 100644 index 0000000000..90e45ddb7d --- /dev/null +++ b/dom/bindings/parser/tests/test_typedef_identifier_conflict.py @@ -0,0 +1,19 @@ +def WebIDLTest(parser, harness): + exception = None + try: + parser.parse( + """ + typedef long foo; + typedef long foo; + """ + ) + + parser.finish() + except Exception as e: + exception = e + + harness.ok(exception, "Should have thrown.") + harness.ok( + "Multiple unresolvable definitions of identifier 'foo'" in str(exception), + "Should have a sane exception message", + ) |