blob: 7e99f87ae9b57247fa2a1362a7f08949edb96021 [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)");