jdk-24/jdk/test/tools/jjs/strict.js
Athijegannathan Sundararajan 4ab55ae7c1 8145750: jjs fails to run simple scripts with security manager turned on
Reviewed-by: hannesw, alanb
2015-12-21 09:40:00 +05:30

13 lines
281 B
JavaScript

/*
* This is the test JavaScript program used in jjs-strictTest.sh
*/
try {
v = "hello";
throw new Error("should have thrown ReferenceError");
} catch (e) {
if (! (e instanceof ReferenceError)) {
throw new Error("ReferenceError expected, got " + e);
}
}