summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/for-of/next-1.js
blob: 6d246a22aa8efc1c0394607915cb41975a09bd34 (plain)
1
2
3
4
5
// Iterator.prototype.next throws if applied to a value that isn't an iterator.

load(libdir + "asserts.js");
for (var v of [null, undefined, false, 0, "ponies", {}, [], this])
    assertThrowsInstanceOf(function () { Iterator.prototype.next.call(v); }, TypeError);