Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/caps/tests/unit/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 941 B image not shown  

Quelle  test_ipv6_host_literal.js

  Sprache: JAVA
 

var ssm = Services.scriptSecurityManager;
function makeURI(uri) {
  return Services.io.newURI(uri);
}

function testIPV6Host(aHost, aExpected) {
  var ipv6Host = ssm.createContentPrincipal(makeURI(aHost), {});
  Assert.equal(ipv6Host.origin, aExpected);
}

function run_test() {
  testIPV6Host("http://[::1]/", "http://[::1]");

  testIPV6Host(
    "http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/",
    "http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]"
  );

  testIPV6Host(
    "http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443/",
    "http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443"
  );

  testIPV6Host(
    "http://[2001:db8:85a3::1319:8a2e:370:7348]/",
    "http://[2001:db8:85a3:0:1319:8a2e:370:7348]"
  );

  testIPV6Host(
    "http://[20D1:0000:3238:DFE1:63:0000:0000:FEFB]/",
    "http://[20d1:0:3238:dfe1:63::fefb]"
  );

  testIPV6Host(
    "http://[20D1:0:3238:DFE1:63::FEFB]/",
    "http://[20d1:0:3238:dfe1:63::fefb]"
  );
}

Messung V0.5 in Prozent
C=72 H=100 G=86

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-06-05) ¤

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