Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/for-of/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 508 B image not shown  

Quelle  value-done-access.js

  Sprache: JAVA
 

// Test that each yield* loop just checks "done", and "value" is only
// fetched once at the end.

load(libdir + 'iteration.js');

var log = "";

function Iter(val, count) {
    function next() {
        return {
            get done() { log += "d"return count-- == 0; },
            get value() { log += "v"return val; }
        }
    }

    this[Symbol.iterator] = function() { return this; };
    this.next = next;
}

for (var x of new Iter(425))
    assertEq(x, 42);

assertEq(log, "dvdvdvdvdvd");

Messung V0.5 in Prozent
C=87 H=87 G=86

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-08-25) ¤

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