summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/regress/regress-573875.js
blob: fcfc00a9e433cb49e3895ebc5b41d0073bd5e00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

var o = {__iterator__:null, a:1, b:2, c:3}
var expect = '__iterator__,a,b,c,';
var actual = '';

try {
    for (var i in o)
        actual += i + ',';
} catch (e) {
    actual = '' + e;
    if (/invalid __iterator__ value/.test(actual) ||
        /null is not a function/.test(actual)) {
        expect = actual;
    }
}

reportCompare(expect, actual, "ok");