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

Quelle  shell-parse.js   Sprache: JAVA

 
// Exercise shell parseModule function.

function testEvalError(source) {
    // Test |source| throws when passed to eval.
    var caught = false;
    try {
        eval(source);
    } catch (e) {
        caught = true;
    }
    assertEq(caught, true);
}

function testModuleSource(source) {
    // Test |source| parses as a module, but throws when passed to eval.
    testEvalError(source);
    parseModule(source);
}

parseModule("");
parseModule("const foo = 1;");
parseModule("var foo = 1;");
parseModule("let foo = 1; var bar = 2; const baz = 3");

testModuleSource("import * as ns from 'bar';");
testModuleSource("export { a } from 'b';");
testModuleSource("export * from 'b';");
testModuleSource("export const foo = 1;");
testModuleSource("export default function() {};");
testModuleSource("export default 1;");

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

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

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