Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/file/tests/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  common_blob_reading.js

  Sprache: JAVA
 

async function testBlobText(blob, content) {
  let text = await blob.text();
  is(text, content, "blob.text()");
}

async function testBlobArrayBuffer(blob, content) {
  let ab = await blob.arrayBuffer();
  is(ab.byteLength, content.length, "blob.arrayBuffer()");
}

async function testBlobStream(blob, content) {
  let s = await blob.stream();
  ok(s instanceof ReadableStream, "We have a ReadableStream");

  let data = await s.getReader().read();
  ok(!data.done, "Nothing is done yet");
  for (let i = 0; i < data.value.length; ++i) {
    is(String.fromCharCode(data.value[i]), content[i], "blob.stream() - " + i);
  }
}

function workify(func, blob, content) {
  info("Workifying " + func);

  return new Promise((resolve, reject) => {
    let worker = new Worker("worker_blob_reading.js");
    worker.postMessage({ func, blob, content });
    worker.onmessage = function (e) {
      if (e.data.type == "done") {
        resolve();
        return;
      }

      if (e.data.type == "error") {
        reject(e.data.message);
        return;
      }

      if (e.data.type == "test") {
        ok(e.data.test, e.data.message);
        return;
      }

      if (e.data.type == "info") {
        info(e.data.message);
      }
    };
  });
}

Messung V0.5 in Prozent
C=94 H=85 G=89

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-06-10) ¤

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