nboyd%atg.com 5aa3abe357 Fix Bug 505463 - Implement Date.toISOString
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257798 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-26 02:35:38 +00:00

11 lines
244 B
JavaScript

function expectTypeError(code) { expectError(code, TypeError); }
function expectError(code, error) {
try {
code();
throw (code.toSource() + ' should have thrown a '+error);
} catch (e if e instanceof error) {
// all good
}
}