PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/arguments/strict-assign-after.js

http://github.com/zpao/v8monkey
JavaScript | 28 lines | 20 code | 4 blank | 4 comment | 1 complexity | 9e31ed374635e29c399a545b20711e21 MD5 | raw file
 1/*
 2 * Any copyright is dedicated to the Public Domain.
 3 * http://creativecommons.org/licenses/publicdomain/
 4 */
 5load(libdir + 'array-compare.js');
 6
 7var obj = {};
 8
 9var upper;
10function strictAssignAfter(a)
11{
12  "use strict";
13  upper = arguments;
14  a = 42;
15  return upper;
16}
17
18var a1, a2, a3;
19for (var i = 0; i < 5; i++)
20{
21  a1 = strictAssignAfter();
22  a2 = strictAssignAfter(17);
23  a3 = strictAssignAfter(obj);
24}
25
26assertEq(arraysEqual(a1, []), true);
27assertEq(arraysEqual(a2, [17]), true);
28assertEq(arraysEqual(a3, [obj]), true);