bug 372331 - modify test to handle uncaught exception.

This commit is contained in:
Bob Clary 2009-02-20 16:57:02 -08:00
Родитель ed6ba987ac
Коммит 2b14abf0da
1 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -57,6 +57,7 @@ function test()
var obj = { index: 1 };
expect = 'No Error';
actual = 'No Error';
function gen()
{
@ -68,13 +69,18 @@ function test()
for (index in gen());
}
if ('index' in obj)
throw "for-in binds name to early";
try
{
if ('index' in obj)
throw "for-in binds name to early";
if (index !== 2)
throw "unexpected value of index: "+index;
actual = 'No Error';
if (index !== 2)
throw "unexpected value of index: "+index;
}
catch(ex)
{
actual = ex + '';
}
reportCompare(expect, actual, summary);