diff options
Diffstat (limited to 'js/src/jit-test/tests/arguments/strict-assign-arguments-element.js')
-rw-r--r-- | js/src/jit-test/tests/arguments/strict-assign-arguments-element.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/strict-assign-arguments-element.js b/js/src/jit-test/tests/arguments/strict-assign-arguments-element.js new file mode 100644 index 0000000000..d2f4f1e5b8 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-assign-arguments-element.js @@ -0,0 +1,21 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictAssignArgumentsElement(a) +{ + "use strict"; + arguments[0] = 42; + return a; +} + +for (var i = 0; i < 5; i++) +{ + assertEq(strictAssignArgumentsElement(), undefined); + assertEq(strictAssignArgumentsElement(obj), obj); + assertEq(strictAssignArgumentsElement(17), 17); +} |