michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: var expect = 'SyntaxError: duplicate argument names not allowed in this context'; michael@0: var actual = 'No error'; michael@0: michael@0: var a = []; michael@0: michael@0: // Test up to 200 to cover tunables such as js::PropertyTree::MAX_HEIGHT. michael@0: for (var i = 0; i < 200; i++) { michael@0: a.push("b" + i); michael@0: try { michael@0: eval("(function ([" + a.join("],[") + "],a,a){})"); michael@0: } catch (e) { michael@0: actual = '' + e; michael@0: } michael@0: assertEq(actual, expect); michael@0: } michael@0: reportCompare(0, 0, "ok");