summaryrefslogtreecommitdiff
path: root/js/src/tests/js1_8_5/regress/regress-620376-2.js
blob: acae97e36449c3185088f0db781b6a5b540bb0ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 * Contributors: Igor Bukanov
 */

function test() {
    var p = Proxy.create({ enumerate: function() { return { get length() { throw 1; }}; }});

    try {
	for (i in p);
	throw new Error("an exception should be thrown");
    } catch (e) {
	assertEq(e, 1);
    }
}

test();
reportCompare(0, 0, "ok");