Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/url/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 921 B image not shown  

Quelle  IdnaTestV2.any.js

  Sprache: JAVA
 

// META: global=window

promise_test(() => fetch("resources/IdnaTestV2.json").then(res => res.json()).then(runTests), "Loading data…");

function runTests(idnaTests) {
  for (const idnaTest of idnaTests) {
    if (typeof idnaTest === "string") {
      continue // skip comments
    }
    if (idnaTest.input === "") {
      continue // cannot test empty string input through new URL()
    }

    test(() => {
      if (idnaTest.output === null) {
        assert_throws_js(TypeError, () => new URL(`https://${idnaTest.input}/x`));
      } else {
        const url = new URL(`https://${idnaTest.input}/x`);
        assert_equals(url.host, idnaTest.output);
        assert_equals(url.hostname, idnaTest.output);
        assert_equals(url.pathname, "/x");
        assert_equals(url.href, `https://${idnaTest.output}/x`);
      }
    }, `ToASCII("${idnaTest.input}")${idnaTest.comment ? " " + idnaTest.comment : ""}`);
  }
}

Messung V0.5 in Prozent
C=91 H=99 G=94

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.