2017-05-31 11:40:31 +00:00
|
|
|
Tests breakable locations in await expression.
|
|
|
|
|
|
|
|
Running test: testBreakLocations
|
|
|
|
|
|
|
|
function testFunction() {
|
|
|
|
async function f1() {
|
2017-07-13 13:53:13 +00:00
|
|
|
for (let x = |_|0; x |_|< 1; ++|_|x) |_|await x;
|
2017-05-31 11:40:31 +00:00
|
|
|
|_|return await Promise.|C|resolve(2);
|
|
|
|
|R|}
|
|
|
|
|
|
|
|
async function f2() {
|
|
|
|
let r = |_|await |C|f1() + await |C|f1();
|
|
|
|
|_|await |C|f1();
|
|
|
|
|_|await |C|f1().|C|then(x => x |_|* 2|R|);
|
|
|
|
|_|await [1].|C|map(x => Promise.|C|resolve(x)|R|)[0];
|
|
|
|
|_|await Promise.|C|resolve().|C|then(x => x |_|* 2|R|);
|
|
|
|
let p = |_|Promise.|C|resolve(42);
|
2017-07-13 13:53:13 +00:00
|
|
|
|_|await p;
|
2017-05-31 11:40:31 +00:00
|
|
|
|_|return r;
|
|
|
|
|R|}
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
return |C|f2();|R|
|
2017-07-14 17:50:09 +00:00
|
|
|
}
|
2017-05-31 11:40:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
Running test: testStepInto
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
testFunction (test.js:18:9)
|
2017-05-31 11:40:31 +00:00
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
|
2017-07-17 19:02:35 +00:00
|
|
|
return #f2();
|
2017-05-31 11:40:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
f2 (test.js:8:12)
|
|
|
|
testFunction (test.js:18:9)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
async function f2() {
|
|
|
|
let r = #await f1() + await f1();
|
|
|
|
await f1();
|
|
|
|
|
|
|
|
f1 (test.js:3:17)
|
|
|
|
f2 (test.js:8:18)
|
|
|
|
testFunction (test.js:18:9)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = #0; x < 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
f2 (test.js:8:18)
|
|
|
|
testFunction (test.js:18:9)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:32)
|
|
|
|
f2 (test.js:8:18)
|
|
|
|
testFunction (test.js:18:9)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++x) #await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:29)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++#x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:4:4)
|
|
|
|
for (let x = 0; x < 1; ++x) await x;
|
|
|
|
#return await Promise.resolve(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
f1 (test.js:5:2)
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
f2 (test.js:8:31)
|
|
|
|
async function f2() {
|
|
|
|
let r = await f1() + await #f1();
|
|
|
|
await f1();
|
|
|
|
|
|
|
|
f1 (test.js:3:17)
|
|
|
|
f2 (test.js:8:31)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = #0; x < 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
f2 (test.js:8:31)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:32)
|
|
|
|
f2 (test.js:8:31)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++x) #await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:29)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++#x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:4:4)
|
|
|
|
for (let x = 0; x < 1; ++x) await x;
|
|
|
|
#return await Promise.resolve(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
f1 (test.js:5:2)
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
f2 (test.js:9:4)
|
|
|
|
let r = await f1() + await f1();
|
|
|
|
#await f1();
|
|
|
|
await f1().then(x => x * 2);
|
|
|
|
|
|
|
|
f1 (test.js:3:17)
|
|
|
|
f2 (test.js:9:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = #0; x < 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
f2 (test.js:9:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:32)
|
|
|
|
f2 (test.js:9:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++x) #await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:29)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++#x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:4:4)
|
|
|
|
for (let x = 0; x < 1; ++x) await x;
|
|
|
|
#return await Promise.resolve(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
f1 (test.js:5:2)
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
f2 (test.js:10:4)
|
|
|
|
await f1();
|
|
|
|
#await f1().then(x => x * 2);
|
|
|
|
await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
|
|
|
|
f1 (test.js:3:17)
|
|
|
|
f2 (test.js:10:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = #0; x < 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
f2 (test.js:10:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:32)
|
|
|
|
f2 (test.js:10:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++x) #await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:29)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++#x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:4:4)
|
|
|
|
for (let x = 0; x < 1; ++x) await x;
|
|
|
|
#return await Promise.resolve(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
f1 (test.js:5:2)
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
f1.then.x (test.js:10:27)
|
|
|
|
await f1();
|
|
|
|
await f1().then(x => x #* 2);
|
|
|
|
await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
|
|
|
|
f1.then.x (test.js:10:30)
|
|
|
|
await f1();
|
|
|
|
await f1().then(x => x * 2#);
|
|
|
|
await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
|
|
|
|
f2 (test.js:11:4)
|
|
|
|
await f1().then(x => x * 2);
|
|
|
|
#await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
await Promise.resolve().then(x => x * 2);
|
|
|
|
|
|
|
|
map.x (test.js:11:31)
|
|
|
|
f2 (test.js:11:14)
|
|
|
|
await f1().then(x => x * 2);
|
|
|
|
await [1].map(x => Promise.#resolve(x))[0];
|
|
|
|
await Promise.resolve().then(x => x * 2);
|
|
|
|
|
|
|
|
map.x (test.js:11:41)
|
|
|
|
f2 (test.js:11:14)
|
|
|
|
await f1().then(x => x * 2);
|
|
|
|
await [1].map(x => Promise.resolve(x)#)[0];
|
|
|
|
await Promise.resolve().then(x => x * 2);
|
|
|
|
|
|
|
|
f2 (test.js:12:4)
|
|
|
|
await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
#await Promise.resolve().then(x => x * 2);
|
|
|
|
let p = Promise.resolve(42);
|
|
|
|
|
|
|
|
f2 (test.js:13:12)
|
|
|
|
await Promise.resolve().then(x => x * 2);
|
|
|
|
let p = #Promise.resolve(42);
|
|
|
|
await p;
|
|
|
|
|
|
|
|
f2 (test.js:14:4)
|
|
|
|
let p = Promise.resolve(42);
|
|
|
|
#await p;
|
|
|
|
return r;
|
|
|
|
|
|
|
|
f2 (test.js:15:4)
|
|
|
|
await p;
|
|
|
|
#return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
f2 (test.js:16:2)
|
|
|
|
return r;
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Running test: testStepOver
|
|
|
|
f2 (test.js:8:12)
|
|
|
|
testFunction (test.js:18:9)
|
|
|
|
(anonymous) (expr.js:0:0)
|
|
|
|
async function f2() {
|
|
|
|
let r = #await f1() + await f1();
|
|
|
|
await f1();
|
|
|
|
|
|
|
|
f2 (test.js:8:31)
|
|
|
|
async function f2() {
|
|
|
|
let r = await f1() + await #f1();
|
|
|
|
await f1();
|
|
|
|
|
|
|
|
f2 (test.js:9:4)
|
|
|
|
let r = await f1() + await f1();
|
|
|
|
#await f1();
|
|
|
|
await f1().then(x => x * 2);
|
|
|
|
|
|
|
|
f2 (test.js:10:4)
|
|
|
|
await f1();
|
|
|
|
#await f1().then(x => x * 2);
|
|
|
|
await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
|
|
|
|
f2 (test.js:11:4)
|
|
|
|
await f1().then(x => x * 2);
|
|
|
|
#await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
await Promise.resolve().then(x => x * 2);
|
|
|
|
|
|
|
|
f2 (test.js:12:4)
|
|
|
|
await [1].map(x => Promise.resolve(x))[0];
|
|
|
|
#await Promise.resolve().then(x => x * 2);
|
|
|
|
let p = Promise.resolve(42);
|
|
|
|
|
|
|
|
f2 (test.js:13:12)
|
|
|
|
await Promise.resolve().then(x => x * 2);
|
|
|
|
let p = #Promise.resolve(42);
|
|
|
|
await p;
|
|
|
|
|
|
|
|
f2 (test.js:14:4)
|
|
|
|
let p = Promise.resolve(42);
|
|
|
|
#await p;
|
|
|
|
return r;
|
|
|
|
|
|
|
|
f2 (test.js:15:4)
|
|
|
|
await p;
|
|
|
|
#return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
f2 (test.js:16:2)
|
|
|
|
return r;
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Running test: testStepIntoAfterBreakpoint
|
|
|
|
f2 (test.js:9:4)
|
|
|
|
let r = await f1() + await f1();
|
|
|
|
#await f1();
|
|
|
|
await f1().then(x => x * 2);
|
|
|
|
|
|
|
|
f1 (test.js:3:17)
|
|
|
|
f2 (test.js:9:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = #0; x < 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
f2 (test.js:9:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:32)
|
|
|
|
f2 (test.js:9:10)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++x) #await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:29)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x < 1; ++#x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:3:22)
|
|
|
|
async function f1() {
|
|
|
|
for (let x = 0; x #< 1; ++x) await x;
|
|
|
|
return await Promise.resolve(2);
|
|
|
|
|
|
|
|
f1 (test.js:4:4)
|
|
|
|
for (let x = 0; x < 1; ++x) await x;
|
|
|
|
#return await Promise.resolve(2);
|
|
|
|
}
|
|
|
|
|