| 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | |
| 6 | var gTestfile = 'regress-162392.js'; |
| 7 | |
| 8 | //----------------------------------------------------------------------------- |
| 9 | // SUMMARY: 10.1.8 Arguments Object length |
| 10 | |
| 11 | var BUGNUMBER = 162392; |
| 12 | var summary = 'eval("arguments").length == 0 when no arguments specified'; |
| 13 | var actual = noargslength(); |
| 14 | var expect = 0; |
| 15 | |
| 16 | function noargslength() |
| 17 | { |
| 18 | enterFunc('noargslength'); |
| 19 | return eval('arguments').length; |
| 20 | exitFunc('noargslength'); |
| 21 | } |
| 22 | |
| 23 | //----------------------------------------------------------------------------- |
| 24 | test(); |
| 25 | //----------------------------------------------------------------------------- |
| 26 | |
| 27 | function test() |
| 28 | { |
| 29 | enterFunc ('test'); |
| 30 | printBugNumber(BUGNUMBER); |
| 31 | printStatus (summary); |
| 32 | |
| 33 | reportCompare(expect, actual, summary); |
| 34 | |
| 35 | exitFunc ('test'); |
| 36 | } |