michael@0: // Iterator.prototype.next throws if applied to a non-iterator that inherits from an iterator. michael@0: michael@0: load(libdir + "asserts.js"); michael@0: load(libdir + "iteration.js"); michael@0: michael@0: var it = [1, 2][std_iterator](); michael@0: var v = Object.create(it); michael@0: assertThrowsInstanceOf(function () { Iterator.prototype.next.call(v); }, TypeError);