blob: 7f6ee1723b1be2c5178caf52ea527b69a6443df8 [file] [log] [blame]
description('Test for (foo in somethingWhichThrows) to catch ASSERT');
function throwNullException() {
throw null;
}
function throwUndefinedException() {
throw undefined;
}
function throwStringException() {
throw "PASSED"
}
function test(func) {
for (var foo in func()) {
testFailed("Shoud not be reached");
}
}
shouldBeUndefined("test(throwUndefinedException)");
shouldBeUndefined("test(throwNullException)");
shouldThrow("test(throwStringException)");
var successfullyParsed = true;