Commit dc778a3d authored by jgruber's avatar jgruber Committed by Commit Bot

Fix arguments.js test

The second f1 function would overwrite the first, breaking all tests
that were intended to use the first f1 definition.

Bug: 
Change-Id: I79dd1ae344ebf3cf08991d550983f1b01274b352
Reviewed-on: https://chromium-review.googlesource.com/581528Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46856}
parent aad9d2cd
......@@ -170,7 +170,7 @@ function list_args(a) {
}
function f1(x, y) {
function f7(x, y) {
function g(p) {
x = p;
}
......@@ -178,10 +178,10 @@ function f1(x, y) {
return list_args(arguments);
}
assertArrayEquals([0], f1());
assertArrayEquals([1, void 0], f1(3));
assertArrayEquals([2, 5, 5], f1(3, 5));
assertArrayEquals([3, 5, 5, 7], f1(3, 5, 7));
assertArrayEquals([0], f7());
assertArrayEquals([1, void 0], f7(3));
assertArrayEquals([2, 5, 5], f7(3, 5));
assertArrayEquals([3, 5, 5, 7], f7(3, 5, 7));
// Check out of bounds behavior.
function arg_get(x) { return arguments[x]; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment