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

Quelle  test_usvstring.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/bindings/test/test_usvstring.html


<!-- Any copyright is dedicated to the Public Domain.
   - http://creativecommons.org/publicdomain/zero/1.0/ -->

<!DOCTYPE HTML>
<html>
<head>
  <title>Test USVString</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<script class="testbody" type="application/javascript">
/* global TestInterfaceJS */

SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
  var testInterfaceJS = new TestInterfaceJS();
  ok(testInterfaceJS, "got a TestInterfaceJS object");
  // For expected values, see algorithm definition here:
  //  http://heycam.github.io/webidl/#dfn-obtain-unicode
  var testList = [
    { string:   "foo",
      expected: "foo" },
    { string:   "This is U+2070E: \ud841\udf0e",
      expected: "This is U+2070E: \ud841\udf0e" },
    { string:   "Missing low surrogate: \ud841",
      expected: "Missing low surrogate: \ufffd" },
    { string:   "Missing low surrogate with trailer: \ud841!!",
      expected: "Missing low surrogate with trailer: \ufffd!!" },
    { string:   "Missing high surrogate: \udf0e",
      expected: "Missing high surrogate: \ufffd" },
    { string:   "Missing high surrogate with trailer: \udf0e!!",
      expected: "Missing high surrogate with trailer: \ufffd!!" },
    { string:   "U+2070E after malformed: \udf0e\ud841\udf0e",
      expected: "U+2070E after malformed: \ufffd\ud841\udf0e" },
  ];
  testList.forEach(function(test) {
    is(testInterfaceJS.convertSVS(test.string), test.expected, "Convert '" + test.string "'");
  });
  SimpleTest.finish();
});
</script>
</body>
</html>

Messung V0.5
C=98 H=100 G=98

¤ Dauer der Verarbeitung: 0.14 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.