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_union_nullable.py   Sprache: Python

 
import WebIDL


def WebIDLTest(parser, harness):
    threw = False
    try:
        parser.parse(
            """
            interface OneNullableInUnion {
              undefined foo((object? or DOMString?) arg);
            };
        """
        )

        parser.finish()
    except WebIDL.WebIDLError:
        threw = True

    harness.ok(threw, "Two nullable member types of a union should have thrown.")

    parser.reset()
    threw = False

    try:
        parser.parse(
            """
            interface NullableInNullableUnion {
              undefined foo((object? or DOMString)? arg);
            };
        """
        )

        parser.finish()
    except WebIDL.WebIDLError:
        threw = True

    harness.ok(
        threw,
        "A nullable union type with a nullable member type should have " "thrown.",
    )

    parser.reset()
    threw = False

    try:
        parser.parse(
            """
            interface NullableInUnionNullableUnionHelper {
            };
            interface NullableInUnionNullableUnion {
              undefined foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg);
            };
        """
        )

        parser.finish()
    except WebIDL.WebIDLError:
        threw = True

    harness.ok(
        threw,
        "A nullable union type with a nullable member type should have " "thrown.",
    )

Messung V0.5
C=94 H=99 G=96

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© 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.