JavaScript Test Library - catch too much recursion exception, bug 234398

git-svn-id: svn://10.0.0.236/trunk@201146 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bclary%bclary.com
2006-06-28 21:50:09 +00:00
parent e7b3784930
commit 2c77f7dc91

View File

@@ -37,13 +37,11 @@
//-----------------------------------------------------------------------------
var bug = 234389;
var summary = 'Do not Crash when overloaded toString causes infinite recursion';
var actual = 'No Crash';
var expect = 'No Crash';
var actual = ''
var expect = 'Internal Error: too much recursion';
printBugNumber (bug);
printStatus (summary);
printStatus ("Expect too much recursion error");
expectExitCode(3);
var foo = {
toString: function() {
@@ -58,6 +56,15 @@ var foo = {
re: /bar/
};
var f = foo.toString();
try
{
var f = foo.toString();
expect = 'No Crash';
actual = 'No Crash';
}
catch(ex)
{
expect = 'InternalError: too much recursion';
actual = ex.name + ': ' + ex.message;
}
reportCompare(expect, actual, summary);