Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  stepping.js   Sprache: JAVA

 
// Test that stepping through a function stops at the expected lines.
// `script` is a string, some JS code that evaluates to a function.
// `expected` is the array of line numbers where stepping is expected to stop
// when we call the function.
function testStepping(script, expected) {
    let g = newGlobal({newCompartment: true});
    let f = g.eval(script);

    let log = [];
    function maybePause(frame) {
        let previousLine = log[log.length - 1]; // note: may be undefined
        let line = frame.script.getOffsetLocation(frame.offset).lineNumber;
        if (line !== previousLine)
            log.push(line);
    }

    let dbg = new Debugger(g);
    dbg.onEnterFrame = frame => {
        // Log this pause (before the first instruction of the function).
        maybePause(frame);

        // Log future pauses in the same stack frame.
        frame.onStep = function() { maybePause(this); };

        // Now disable this hook so that we step over function calls, not into them.
        dbg.onEnterFrame = undefined;
    };

    f();

    assertEq(log.join(","), expected.join(","));
}

Messung V0.5
C=92 H=100 G=95

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge