js/src/tests/ecma/extensions/15-2.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/ecma/extensions/15-2.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     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-2.js
    1.12 +   ECMA Section:       15 Native ECMAScript Objects
    1.13 +
    1.14 +   Description:        Every built-in function and every built-in constructor
    1.15 +   has the Function prototype object, which is the value of
    1.16 +   the expression Function.prototype as the value of its
    1.17 +   internal [[Prototype]] property, except the Function
    1.18 +   prototype object itself.
    1.19 +
    1.20 +   That is, the __proto__ property of builtin functions and
    1.21 +   constructors should be the Function.prototype object.
    1.22 +
    1.23 +   Author:             christine@netscape.com
    1.24 +   Date:               28 october 1997
    1.25 +
    1.26 +*/
    1.27 +var SECTION = "15-2";
    1.28 +var VERSION = "ECMA_1";
    1.29 +startTest();
    1.30 +var TITLE   = "Native ECMAScript Objects";
    1.31 +
    1.32 +writeHeaderToLog( SECTION + " "+ TITLE);
    1.33 +
    1.34 +new TestCase( SECTION,  "Object.__proto__",   Function.prototype,   Object.__proto__ );
    1.35 +new TestCase( SECTION,  "Array.__proto__",    Function.prototype,   Array.__proto__ );
    1.36 +new TestCase( SECTION,  "String.__proto__",   Function.prototype,   String.__proto__ );
    1.37 +new TestCase( SECTION,  "Boolean.__proto__",  Function.prototype,   Boolean.__proto__ );
    1.38 +new TestCase( SECTION,  "Number.__proto__",   Function.prototype,   Number.__proto__ );
    1.39 +new TestCase( SECTION,  "Date.__proto__",     Function.prototype,   Date.__proto__ );
    1.40 +new TestCase( SECTION,  "TestCase.__proto__", Function.prototype,   TestCase.__proto__ );
    1.41 +
    1.42 +new TestCase( SECTION,  "eval.__proto__",     Function.prototype,   eval.__proto__ );
    1.43 +new TestCase( SECTION,  "Math.pow.__proto__", Function.prototype,   Math.pow.__proto__ );
    1.44 +new TestCase( SECTION,  "String.prototype.indexOf.__proto__", Function.prototype,   String.prototype.indexOf.__proto__ );
    1.45 +
    1.46 +test();

mercurial