summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Array/values.js
blob: 52a0b63c6c9916419f88e20cb61bc97a391de705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/ */

assertEq(Array.prototype.values, Array.prototype[Symbol.iterator]);
assertEq(Array.prototype.values.name, "values");
assertEq(Array.prototype.values.length, 0);

function valuesUnscopeable() {
    var values = "foo";
    with ([1, 2, 3]) {
        assertEq(indexOf, Array.prototype.indexOf);
        assertEq(values, "foo");
    }
}
valuesUnscopeable();

if (typeof reportCompare === 'function')
    reportCompare(0, 0);