js/src/tests/ecma/FunctionObjects/15.3.5.1.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:39662b3413b4
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
7 /**
8 File Name: 15.3.5.1.js
9 ECMA Section: Function.length
10 Description:
11
12 The value of the length property is usually an integer that indicates the
13 "typical" number of arguments expected by the function. However, the
14 language permits the function to be invoked with some other number of
15 arguments. The behavior of a function when invoked on a number of arguments
16 other than the number specified by its length property depends on the function.
17
18 this test needs a 1.2 version check.
19
20 http://scopus.mcom.com/bugsplat/show_bug.cgi?id=104204
21
22
23 Author: christine@netscape.com
24 Date: 12 november 1997
25 */
26
27 var SECTION = "15.3.5.1";
28 var VERSION = "ECMA_1";
29 var TITLE = "Function.length";
30 var BUGNUMBER="104204";
31 startTest();
32
33 writeHeaderToLog( SECTION + " "+ TITLE);
34
35 var f = new Function( "a","b", "c", "return f.length");
36
37 new TestCase( SECTION,
38 'var f = new Function( "a","b", "c", "return f.length"); f()',
39 3,
40 f() );
41
42
43 new TestCase( SECTION,
44 'var f = new Function( "a","b", "c", "return f.length"); f(1,2,3,4,5)',
45 3,
46 f(1,2,3,4,5) );
47
48 test();
49

mercurial