1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/ecma/FunctionObjects/15.3.5.1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 + 1.10 +/** 1.11 + File Name: 15.3.5.1.js 1.12 + ECMA Section: Function.length 1.13 + Description: 1.14 + 1.15 + The value of the length property is usually an integer that indicates the 1.16 + "typical" number of arguments expected by the function. However, the 1.17 + language permits the function to be invoked with some other number of 1.18 + arguments. The behavior of a function when invoked on a number of arguments 1.19 + other than the number specified by its length property depends on the function. 1.20 + 1.21 + this test needs a 1.2 version check. 1.22 + 1.23 + http://scopus.mcom.com/bugsplat/show_bug.cgi?id=104204 1.24 + 1.25 + 1.26 + Author: christine@netscape.com 1.27 + Date: 12 november 1997 1.28 +*/ 1.29 + 1.30 +var SECTION = "15.3.5.1"; 1.31 +var VERSION = "ECMA_1"; 1.32 +var TITLE = "Function.length"; 1.33 +var BUGNUMBER="104204"; 1.34 +startTest(); 1.35 + 1.36 +writeHeaderToLog( SECTION + " "+ TITLE); 1.37 + 1.38 +var f = new Function( "a","b", "c", "return f.length"); 1.39 + 1.40 +new TestCase( SECTION, 1.41 + 'var f = new Function( "a","b", "c", "return f.length"); f()', 1.42 + 3, 1.43 + f() ); 1.44 + 1.45 + 1.46 +new TestCase( SECTION, 1.47 + 'var f = new Function( "a","b", "c", "return f.length"); f(1,2,3,4,5)', 1.48 + 3, 1.49 + f(1,2,3,4,5) ); 1.50 + 1.51 +test(); 1.52 +