PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

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