Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openjdk/src/hotspot/cpu/zero/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 1 kB image not shown  

Quellcode-Bibliothek test_console_eval-01.js

  Sprache: JAVA
 

/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */


"use strict";

/*
 * Check that is possible to evaluate JS with evaluation timeouts in place.
 */


add_task(
  threadFrontTest(async ({ commands }) => {
    await commands.scriptCommand.execute(`
      function fib(n) {
        if (n == 1 || n == 0) {
          return 1;
        }

        return fib(n-1) + fib(n-2)
      }
    `);

    const normalResult = await commands.scriptCommand.execute("fib(1)", {
      eager: true,
    });
    Assert.equal(normalResult.result, 1"normal eval");

    const timeoutResult = await commands.scriptCommand.execute("fib(100)", {
      eager: true,
    });
    Assert.equal(typeof timeoutResult.result, "object""timeout eval");
    Assert.equal(timeoutResult.result.type, "undefined""timeout eval type");
  })
);

Messung V0.5 in Prozent
C=90 H=92 G=90

¤ 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.0.53Bemerkung:  (vorverarbeitet am  2026-08-25) ¤

*Bot Zugriff






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.