1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_8_5/regress/regress-619003-1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,20 @@ 1.4 +/* 1.5 + * Any copyright is dedicated to the Public Domain. 1.6 + * http://creativecommons.org/licenses/publicdomain/ 1.7 + */ 1.8 +var expect = 'SyntaxError: duplicate argument names not allowed in this context'; 1.9 +var actual = 'No error'; 1.10 + 1.11 +var a = []; 1.12 + 1.13 +// Test up to 200 to cover tunables such as js::PropertyTree::MAX_HEIGHT. 1.14 +for (var i = 0; i < 200; i++) { 1.15 + a.push("b" + i); 1.16 + try { 1.17 + eval("(function ([" + a.join("],[") + "],a,a){})"); 1.18 + } catch (e) { 1.19 + actual = '' + e; 1.20 + } 1.21 + assertEq(actual, expect); 1.22 +} 1.23 +reportCompare(0, 0, "ok");