mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:25:08 +00:00
23 lines
308 B
JavaScript
23 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);
|
|
}
|