Index: test/mjsunit/harmony/iteration-semantics.js |
diff --git a/test/mjsunit/harmony/iteration-semantics.js b/test/mjsunit/harmony/iteration-semantics.js |
index 803f12faa9316d5a7c19aa57dbad9c9103408873..cc3cea809224096ec5b485726e88c0bb6b8302ca 100644 |
--- a/test/mjsunit/harmony/iteration-semantics.js |
+++ b/test/mjsunit/harmony/iteration-semantics.js |
@@ -213,9 +213,9 @@ assertEquals([1, 2], |
{ value: 37, done: true }, |
never_getter(never_getter({}, 'done'), 'value')]))); |
-// Null and undefined do not cause an error. |
-assertEquals(0, fold(sum, 0, unreachable(null))); |
-assertEquals(0, fold(sum, 0, unreachable(undefined))); |
+// Unlike the case with for-in, null and undefined cause an error. |
+assertThrows('fold(sum, 0, unreachable(null))', TypeError); |
+assertThrows('fold(sum, 0, unreachable(undefined))', TypeError); |
// Other non-iterators do cause an error. |
assertThrows('fold(sum, 0, unreachable({}))', TypeError); |