PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

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

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