Index: mozilla-tests/js1_7/regress/regress-372331.js |
=================================================================== |
--- mozilla-tests/js1_7/regress/regress-372331.js (revision 43940) |
+++ mozilla-tests/js1_7/regress/regress-372331.js (working copy) |
@@ -57,6 +57,7 @@ |
var obj = { index: 1 }; |
expect = 'No Error'; |
+ actual = 'No Error'; |
function gen() |
{ |
@@ -68,14 +69,19 @@ |
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; |
+ if (index !== 2) |
+ throw "unexpected value of index: "+index; |
+ } |
+ catch(ex) |
+ { |
+ actual = ex + ''; |
+ } |
- actual = 'No Error'; |
- |
reportCompare(expect, actual, summary); |
exitFunc ('test'); |