mirror of
https://github.com/tc39/test262.git
synced 2025-05-29 11:10:32 +02:00
Generated tests for refactoring (IIFE/async function).then(\$DONE, \$DONE); to use asyncTest
This commit is contained in:
parent
4d9d5c570d
commit
4fe158d39d
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-async-function-definitions
|
esid: sec-async-function-definitions
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
flags: [generated, async, noStrict]
|
flags: [generated, async, noStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
Async Function Definitions
|
Async Function Definitions
|
||||||
|
|
||||||
@ -24,8 +25,8 @@ let ref = async function BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue(await ref(), ref);
|
assert.sameValue(await ref(), ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-async-function-definitions
|
esid: sec-async-function-definitions
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
flags: [generated, async, noStrict]
|
flags: [generated, async, noStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
Async Function Definitions
|
Async Function Definitions
|
||||||
|
|
||||||
@ -22,8 +23,8 @@ let ref = async function BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue(await ref(), ref);
|
assert.sameValue(await ref(), ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-async-function-definitions
|
esid: sec-async-function-definitions
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
flags: [generated, async, noStrict]
|
flags: [generated, async, noStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
Async Function Definitions
|
Async Function Definitions
|
||||||
|
|
||||||
@ -22,8 +23,8 @@ let ref = async function BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue(await ref(), ref);
|
assert.sameValue(await ref(), ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-async-function-definitions
|
esid: sec-async-function-definitions
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
flags: [generated, async, onlyStrict]
|
flags: [generated, async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
Async Function Definitions
|
Async Function Definitions
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ let ref = async function BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
await ref()
|
await ref()
|
||||||
@ -34,5 +35,5 @@ let ref = async function BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-async-function-definitions
|
esid: sec-async-function-definitions
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
flags: [generated, async, onlyStrict]
|
flags: [generated, async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
Async Function Definitions
|
Async Function Definitions
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ let ref = async function BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
await ref()
|
await ref()
|
||||||
@ -32,5 +33,5 @@ let ref = async function BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-async-function-definitions
|
esid: sec-async-function-definitions
|
||||||
features: [async-functions]
|
features: [async-functions]
|
||||||
flags: [generated, async, onlyStrict]
|
flags: [generated, async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
Async Function Definitions
|
Async Function Definitions
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ let ref = async function BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
await ref()
|
await ref()
|
||||||
@ -32,5 +33,5 @@ let ref = async function BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-asyncgenerator-definitions-evaluation
|
esid: sec-asyncgenerator-definitions-evaluation
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [generated, async, noStrict]
|
flags: [generated, async, noStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
AsyncGeneratorExpression :
|
AsyncGeneratorExpression :
|
||||||
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
||||||
@ -22,8 +23,8 @@ let ref = async function * BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue((await (await ref()).next()).value, ref);
|
assert.sameValue((await (await ref()).next()).value, ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-asyncgenerator-definitions-evaluation
|
esid: sec-asyncgenerator-definitions-evaluation
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [generated, async, noStrict]
|
flags: [generated, async, noStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
AsyncGeneratorExpression :
|
AsyncGeneratorExpression :
|
||||||
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
||||||
@ -20,8 +21,8 @@ let ref = async function * BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue((await (await ref()).next()).value, ref);
|
assert.sameValue((await (await ref()).next()).value, ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-asyncgenerator-definitions-evaluation
|
esid: sec-asyncgenerator-definitions-evaluation
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [generated, async, noStrict]
|
flags: [generated, async, noStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
AsyncGeneratorExpression :
|
AsyncGeneratorExpression :
|
||||||
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
||||||
@ -20,8 +21,8 @@ let ref = async function * BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
assert.sameValue((await (await ref()).next()).value, ref);
|
assert.sameValue((await (await ref()).next()).value, ref);
|
||||||
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
assert.sameValue(callCount, 1, 'function invoked exactly once');
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-asyncgenerator-definitions-evaluation
|
esid: sec-asyncgenerator-definitions-evaluation
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [generated, async, onlyStrict]
|
flags: [generated, async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
AsyncGeneratorExpression :
|
AsyncGeneratorExpression :
|
||||||
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
||||||
@ -22,7 +23,7 @@ let ref = async function * BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
(await (await ref()).next()).value
|
(await (await ref()).next()).value
|
||||||
@ -32,5 +33,5 @@ let ref = async function * BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-asyncgenerator-definitions-evaluation
|
esid: sec-asyncgenerator-definitions-evaluation
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [generated, async, onlyStrict]
|
flags: [generated, async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
AsyncGeneratorExpression :
|
AsyncGeneratorExpression :
|
||||||
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
||||||
@ -20,7 +21,7 @@ let ref = async function * BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
(await (await ref()).next()).value
|
(await (await ref()).next()).value
|
||||||
@ -30,5 +31,5 @@ let ref = async function * BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod
|
|||||||
esid: sec-asyncgenerator-definitions-evaluation
|
esid: sec-asyncgenerator-definitions-evaluation
|
||||||
features: [async-iteration]
|
features: [async-iteration]
|
||||||
flags: [generated, async, onlyStrict]
|
flags: [generated, async, onlyStrict]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
info: |
|
info: |
|
||||||
AsyncGeneratorExpression :
|
AsyncGeneratorExpression :
|
||||||
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
|
||||||
@ -20,7 +21,7 @@ let ref = async function * BindingIdentifier() {
|
|||||||
return BindingIdentifier;
|
return BindingIdentifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
(async () => {
|
asyncTest(async () => {
|
||||||
let catchCount = 0;
|
let catchCount = 0;
|
||||||
try {
|
try {
|
||||||
(await (await ref()).next()).value
|
(await (await ref()).next()).value
|
||||||
@ -30,5 +31,5 @@ let ref = async function * BindingIdentifier() {
|
|||||||
}
|
}
|
||||||
assert.sameValue(catchCount, 1);
|
assert.sameValue(catchCount, 1);
|
||||||
assert.sameValue(callCount, 1);
|
assert.sameValue(callCount, 1);
|
||||||
})().then($DONE, $DONE);
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user