1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +// Superficial tests of the Array.prototype[@@iterator] builtin function and its workalikes. 1.5 + 1.6 +load(libdir + "iteration.js"); 1.7 + 1.8 +var constructors = [Array, String, Uint8Array, Uint8ClampedArray]; 1.9 +for (var c of constructors) { 1.10 + assertEq(c.prototype[std_iterator].length, 0); 1.11 + var desc = Object.getOwnPropertyDescriptor(c.prototype, std_iterator); 1.12 + assertEq(desc.configurable, true); 1.13 + assertEq(desc.enumerable, false); 1.14 + assertEq(desc.writable, true); 1.15 +}