Debian Codegraph @

rhino/testsrc/tests/ecma/FunctionObjects/15.3.4-1.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.4-1.js';
7
8 /**
9 File Name: 15.3.4-1.js
10 ECMA Section: 15.3.4 Properties of the Function Prototype Object
11
12 Description: The Function prototype object is itself a Function
13 object ( its [[Class]] is "Function") that, when
14 invoked, accepts any arguments and returns undefined.
15
16 The value of the internal [[Prototype]] property
17 object is the Object prototype object.
18
19 It is a function with an "empty body"; if it is
20 invoked, it merely returns undefined.
21
22 The Function prototype object does not have a valueOf
23 property of its own; however it inherits the valueOf
24 property from the Object prototype Object.
25
26 Author: [email protected]
27 Date: 28 october 1997
28
29 */
30
31 var SECTION = "15.3.4-1";
32 var VERSION = "ECMA_1";
33 startTest();
34 var TITLE = "Properties of the Function Prototype Object";
35
36 writeHeaderToLog( SECTION + " "+ TITLE);
37
38 new TestCase( SECTION,
39 "var myfunc = Function.prototype; myfunc.toString = Object.prototype.toString; myfunc.toString()",
40 "[object Function]",
41 eval("var myfunc = Function.prototype; myfunc.toString = Object.prototype.toString; myfunc.toString()"));
42
43
44 // new TestCase( SECTION, "Function.prototype.__proto__", Object.prototype, Function.prototype.__proto__ );
45
46 new TestCase( SECTION,
47 "Function.prototype.valueOf",
48 Object.prototype.valueOf,
49 Function.prototype.valueOf );
50
51 new TestCase( SECTION,
52 "Function.prototype()",
53 (void 0),
54 Function.prototype() );
55
56 new TestCase( SECTION,
57 "Function.prototype(1,true,false,'string', new Date(),null)",
58 (void 0),
59 Function.prototype(1,true,false,'string', new Date(),null) );
60
61 test();