FranklinDM 2023-05-07 00:58:34 +08:00 committed by roytam1
commit 2d6c419661
7 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,15 @@
if (!('oomTest' in this))
quit();
loadFile(`
function parseAndEvaluate(source) {
let m = parseModule(source);
m.declarationInstantiation();
}
parseAndEvaluate("async function a() { await 2 + 3; }")
`);
function loadFile(lfVarx) {
oomTest(function() {
eval(lfVarx);
});
}

View file

@ -0,0 +1,13 @@
// |reftest| module
async function f() {
return "success";
}
var AsyncFunction = (async function(){}).constructor;
assertEq(f instanceof AsyncFunction, true);
f().then(v => {
reportCompare("success", v);
});

View file

@ -0,0 +1,13 @@
// |reftest| module skip-if(release_or_beta)
async function* f() {
return "success";
}
var AsyncGenerator = (async function*(){}).constructor;
assertEq(f instanceof AsyncGenerator, true);
f().next().then(v => {
reportCompare("success", v.value);
});

View file

View file