tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_enum_duplicate_values.py (359B)


      1 import WebIDL
      2 
      3 
      4 def WebIDLTest(parser, harness):
      5    try:
      6        parser.parse(
      7            """
      8            enum TestEnumDuplicateValue {
      9              "",
     10              ""
     11            };
     12        """
     13        )
     14        harness.ok(False, "Should have thrown!")
     15    except WebIDL.WebIDLError:
     16        harness.ok(True, "Enum TestEnumDuplicateValue should throw")