1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/collections/iterator-1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +// collection.iterator() returns an Iterator object. 1.5 + 1.6 +load(libdir + "iteration.js"); 1.7 + 1.8 +function test(obj, name) { 1.9 + var iter = obj[std_iterator](); 1.10 + assertEq(typeof iter, "object"); 1.11 + assertEq(iter instanceof Iterator, true); 1.12 + assertEq(iter.toString(), "[object " + obj.constructor.name + " Iterator]"); 1.13 +} 1.14 + 1.15 +test([]); 1.16 +test(new Map); 1.17 +test(new Set);