blob: 5887c1994a523101179db06f24dfa7feb62b5443 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
{
let { line, column } = (function() {/*
something about this comment means the line number gets reported incorrectly in the stack
*/const e = new Error("new error"); return e;
})();
shouldBe(line, 9);
shouldBe(column, 28);
}
{
let { line, column } = (function() {
let s = `
multi
line
string
`; const e = new Error("new error"); return e;
})();
shouldBe(line, 20);
shouldBe(column, 23);
}