Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/debug/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 510 B image not shown  

Quelle  Script-isFunction.js

  Sprache: JAVA
 

// Script.isFunction should do what it is supposed to do.

const g = newGlobal({newCompartment: true});
const dbg = new Debugger;
dbg.addDebuggee(g);

let gNumFunctionScripts = 0;
function countFunctionScripts(script) {
  if (script.isFunction) {
    gNumFunctionScripts++;
  }
  return script.getChildScripts().forEach(countFunctionScripts);
}

dbg.onNewScript = countFunctionScripts;

g.eval(`
function f() {
  function f2() {}
}
async function g() {}
function* h() {}
`);

assertEq(gNumFunctionScripts, 4);

Messung V0.5 in Prozent
C=97 H=81 G=89

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

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