js/src/tests/test262/ch11/11.2/11.2.1/S11.2.1_A4_T5.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/test262/ch11/11.2/11.2.1/S11.2.1_A4_T5.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +// Copyright 2009 the Sputnik authors.  All rights reserved.
     1.5 +// This code is governed by the BSD license found in the LICENSE file.
     1.6 +
     1.7 +/**
     1.8 + * Check type of various properties
     1.9 + *
    1.10 + * @path ch11/11.2/11.2.1/S11.2.1_A4_T5.js
    1.11 + * @description Checking properties of the String object
    1.12 + */
    1.13 +
    1.14 +//CHECK#1-28
    1.15 +if (typeof String.prototype  !== "object")  $ERROR('#1: typeof String.prototype === "object". Actual: ' + (typeof String.prototype ));
    1.16 +if (typeof String['prototype']  !== "object")  $ERROR('#2: typeof String["prototype"] === "object". Actual: ' + (typeof String["prototype"] ));
    1.17 +if (typeof String.fromCharCode  !== "function")  $ERROR('#3: typeof String.fromCharCode === "function". Actual: ' + (typeof String.fromCharCode ));
    1.18 +if (typeof String['fromCharCode']  !== "function")  $ERROR('#4: typeof String["fromCharCode"] === "function". Actual: ' + (typeof String["fromCharCode"] ));
    1.19 +if (typeof String.prototype.toString  !== "function")  $ERROR('#5: typeof String.prototype.toString === "function". Actual: ' + (typeof String.prototype.toString ));
    1.20 +if (typeof String.prototype['toString']  !== "function")  $ERROR('#6: typeof String.prototype["toString"] === "function". Actual: ' + (typeof String.prototype["toString"] ));
    1.21 +if (typeof String.prototype.constructor  !== "function")  $ERROR('#7: typeof String.prototype.constructor === "function". Actual: ' + (typeof String.prototype.constructor ));
    1.22 +if (typeof String.prototype['constructor']  !== "function")  $ERROR('#8: typeof String.prototype["constructor"] === "function". Actual: ' + (typeof String.prototype["constructor"] ));
    1.23 +if (typeof String.prototype.valueOf  !== "function")  $ERROR('#9: typeof String.prototype.valueOf === "function". Actual: ' + (typeof String.prototype.valueOf ));
    1.24 +if (typeof String.prototype['valueOf']  !== "function")  $ERROR('#10: typeof String.prototype["valueOf"] === "function". Actual: ' + (typeof String.prototype["valueOf"] ));
    1.25 +if (typeof String.prototype.charAt !== "function")  $ERROR('#11: typeof String.prototype.charAt === "function". Actual: ' + (typeof String.prototype.charAt ));
    1.26 +if (typeof String.prototype['charAt'] !== "function")  $ERROR('#12: typeof String.prototype["charAt"] === "function". Actual: ' + (typeof String.prototype["charAt"] ));
    1.27 +if (typeof String.prototype.charCodeAt !== "function")  $ERROR('#13: typeof String.prototype.charCodeAt === "function". Actual: ' + (typeof String.prototype.charCodeAt ));
    1.28 +if (typeof String.prototype['charCodeAt'] !== "function")  $ERROR('#14: typeof String.prototype["charCodeAt"] === "function". Actual: ' + (typeof String.prototype["charCodeAt"] ));
    1.29 +if (typeof String.prototype.indexOf  !== "function")  $ERROR('#15: typeof String.prototype.indexOf === "function". Actual: ' + (typeof String.prototype.indexOf ));
    1.30 +if (typeof String.prototype['indexOf']  !== "function")  $ERROR('#16: typeof String.prototype["indexOf"] === "function". Actual: ' + (typeof String.prototype["indexOf"] ));
    1.31 +if (typeof String.prototype.lastIndexOf  !== "function")  $ERROR('#17: typeof String.prototype.lastIndexOf === "function". Actual: ' + (typeof String.prototype.lastIndexOf ));
    1.32 +if (typeof String.prototype['lastIndexOf']  !== "function")  $ERROR('#18: typeof String.prototype["lastIndexOf"] === "function". Actual: ' + (typeof String.prototype["lastIndexOf"] ));
    1.33 +if (typeof String.prototype.split !== "function")  $ERROR('#19: typeof String.prototype.split === "function". Actual: ' + (typeof String.prototype.split ));
    1.34 +if (typeof String.prototype['split'] !== "function")  $ERROR('#20: typeof String.prototype["split"] === "function". Actual: ' + (typeof String.prototype["split"] ));
    1.35 +if (typeof String.prototype.substring  !== "function")  $ERROR('#21: typeof String.prototype.substring === "function". Actual: ' + (typeof String.prototype.substring ));
    1.36 +if (typeof String.prototype['substring']  !== "function")  $ERROR('#22: typeof String.prototype["substring"] === "function". Actual: ' + (typeof String.prototype["substring"] ));
    1.37 +if (typeof String.prototype.toLowerCase !== "function")  $ERROR('#23: typeof String.prototype.toLowerCase === "function". Actual: ' + (typeof String.prototype.toLowerCase ));
    1.38 +if (typeof String.prototype['toLowerCase'] !== "function")  $ERROR('#24: typeof String.prototype["toLowerCase"] === "function". Actual: ' + (typeof String.prototype["toLowerCase"] ));
    1.39 +if (typeof String.prototype.toUpperCase !== "function")  $ERROR('#25: typeof String.prototype.toUpperCase === "function". Actual: ' + (typeof String.prototype.toUpperCase ));
    1.40 +if (typeof String.prototype['toUpperCase'] !== "function")  $ERROR('#26: typeof Array.prototype === "object". Actual: ' + (typeof Array.prototype ));
    1.41 +if (typeof String.prototype.length  !== "number")  $ERROR('#27: typeof String.prototype.length === "number". Actual: ' + (typeof String.prototype.length ));
    1.42 +if (typeof String.prototype['length']  !== "number")  $ERROR('#28: typeof String.prototype["length"] === "number". Actual: ' + (typeof String.prototype["length"] ));
    1.43 +
    1.44 +

mercurial