| 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.js'; |
| 7 | |
| 8 | /** |
| 9 | File Name: 15.3.4.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 | var SECTION = "15.3.4"; |
| 31 | var VERSION = "ECMA_1"; |
| 32 | startTest(); |
| 33 | var TITLE = "Properties of the Function Prototype Object"; |
| 34 | |
| 35 | writeHeaderToLog( SECTION + " "+ TITLE); |
| 36 | |
| 37 | new TestCase( SECTION, |
| 38 | "var myfunc = Function.prototype; myfunc.toString = Object.prototype.toString; myfunc.toString()", |
| 39 | "[object Function]", |
| 40 | eval("var myfunc = Function.prototype; myfunc.toString = Object.prototype.toString; myfunc.toString()")); |
| 41 | |
| 42 | |
| 43 | // new TestCase( SECTION, "Function.prototype.__proto__", Object.prototype, Function.prototype.__proto__ ); |
| 44 | new TestCase( SECTION, "Function.prototype.valueOf", Object.prototype.valueOf, Function.prototype.valueOf ); |
| 45 | new TestCase( SECTION, "Function.prototype()", (void 0), Function.prototype() ); |
| 46 | new TestCase( SECTION, "Function.prototype(1,true,false,'string', new Date(),null)", (void 0), Function.prototype(1,true,false,'string', new Date(),null) ); |
| 47 | |
| 48 | test(); |