michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 630770; michael@0: var summary = michael@0: 'Correctly warn about duplicate parameters when the strict option is enabled'; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: // Verify that duplicate parameters, with the strict option set, don't provoke michael@0: // an assertion. Ideally we'd also verify that we warn exactly once per michael@0: // duplicated parameter name, but at present there's no way to test that michael@0: // without more effort (further customizing the shell JSErrorReporter) than we michael@0: // want to make now. michael@0: options("strict"); michael@0: eval("function a(x, x, x, x) { }"); michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("All tests passed!");