PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/arguments/strict-assign-outer-param.js

http://github.com/zpao/v8monkey
JavaScript | 27 lines | 19 code | 4 blank | 4 comment | 1 complexity | 1d1407e95ad672ad1ef96e37ae946db4 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
 9function strictAssignOuterParam(p)
10{
11  "use strict";
12  function inner() { p = 17; }
13  inner();
14  return arguments;
15}
16
17var a1, a2, a3;
18for (var i = 0; i < 5; i++)
19{
20  a1 = strictAssignOuterParam();
21  a2 = strictAssignOuterParam(42);
22  a3 = strictAssignOuterParam(obj);
23}
24
25assertEq(arraysEqual(a1, []), true);
26assertEq(arraysEqual(a2, [42]), true);
27assertEq(arraysEqual(a3, [obj]), true);