Debian Codegraph @

rhino/testsrc/tests/ecma/extensions/15.3.2.1-2.js

raw symbols SCIP
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 gTestfile = '15.3.2.1-2.js';
7
8 /**
9 File Name: 15.3.2.1.js
10 ECMA Section: 15.3.2.1 The Function Constructor
11 new Function(p1, p2, ..., pn, body )
12
13 Description:
14 Author: [email protected]
15 Date: 28 october 1997
16
17 */
18 var SECTION = "15.3.2.1-2";
19 var VERSION = "ECMA_1";
20 startTest();
21 var TITLE = "The Function Constructor";
22
23 writeHeaderToLog( SECTION + " "+ TITLE);
24
25
26 var myfunc1 = new Function("a","b","c", "return a+b+c" );
27 var myfunc2 = new Function("a, b, c", "return a+b+c" );
28 var myfunc3 = new Function("a,b", "c", "return a+b+c" );
29
30 myfunc1.toString = Object.prototype.toString;
31 myfunc2.toString = Object.prototype.toString;
32 myfunc3.toString = Object.prototype.toString;
33
34
35 new TestCase( SECTION, "myfunc2.__proto__", Function.prototype, myfunc2.__proto__ );
36
37 new TestCase( SECTION, "myfunc3.__proto__", Function.prototype, myfunc3.__proto__ );
38
39 test();