mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
24 lines
308 B
JavaScript
24 lines
308 B
JavaScript
load("test-common.js");
|
|
|
|
try {
|
|
function foo() {
|
|
i = 3;
|
|
assert(i === 3);
|
|
var i;
|
|
}
|
|
|
|
foo();
|
|
|
|
var caught_exception;
|
|
try {
|
|
j = i;
|
|
} catch (e) {
|
|
caught_exception = e;
|
|
}
|
|
assert(caught_exception !== undefined);
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|