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

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

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