mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 372331 - modify test to handle uncaught exception.
This commit is contained in:
parent
595ef6177d
commit
fef6c1fa3a
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user