Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/dom/bindings/parser/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_identifier_conflict.py   Sprache: Python

 
def WebIDLTest(parser, harness):
    try:
        parser.parse(
            """
            enum Foo { "a" };
            interface Foo;
        """
        )
        parser.finish()
        harness.ok(False"Should fail to parse")
    except Exception as e:
        harness.ok(
            "Name collision" in str(e), "Should have name collision for interface"
        )

    parser = parser.reset()
    try:
        parser.parse(
            """
            dictionary Foo { long x; };
            enum Foo { "a" };
        """
        )
        parser.finish()
        harness.ok(False"Should fail to parse")
    except Exception as e:
        harness.ok(
            "Name collision" in str(e), "Should have name collision for dictionary"
        )

    parser = parser.reset()
    try:
        parser.parse(
            """
            enum Foo { "a" };
            enum Foo { "b" };
        """
        )
        parser.finish()
        harness.ok(False"Should fail to parse")
    except Exception as e:
        harness.ok(
            "Multiple unresolvable definitions" in str(e),
            "Should have name collision for dictionary",
        )

Messung V0.5
C=92 H=98 G=94

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.