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_T9.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,94 @@ 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_T9.js 1.11 + * @description Checking properties of the Date object 1.12 + */ 1.13 + 1.14 +//CHECK#1-86 1.15 +if (typeof Date.parse !== "function") $ERROR('#1: typeof Date.parse === "function". Actual: ' + (typeof Date.parse )); 1.16 +if (typeof Date['parse'] !== "function") $ERROR('#2: typeof Date["parse"] === "function". Actual: ' + (typeof Date["parse"] )); 1.17 +if (typeof Date.prototype !== "object") $ERROR('#3: typeof Date.prototype === "object". Actual: ' + (typeof Date.prototype )); 1.18 +if (typeof Date['prototype'] !== "object") $ERROR('#4: typeof Date["prototype"] === "object". Actual: ' + (typeof Date["prototype"] )); 1.19 +if (typeof Date.UTC !== "function") $ERROR('#5: typeof Date.UTC === "function". Actual: ' + (typeof Date.UTC )); 1.20 +if (typeof Date['UTC'] !== "function") $ERROR('#6: typeof Date["UTC"] === "function". Actual: ' + (typeof Date["UTC"] )); 1.21 +if (typeof Date.prototype.constructor !== "function") $ERROR('#7: typeof Date.prototype.constructor === "funvtion". Actual: ' + (typeof Date.prototype.constructor )); 1.22 +if (typeof Date.prototype['constructor'] !== "function") $ERROR('#8: typeof Date.prototype["constructor"] === "function". Actual: ' + (typeof Date.prototype["constructor"] )); 1.23 +if (typeof Date.prototype.toString !== "function") $ERROR('#9: typeof Date.prototype.toString === "function". Actual: ' + (typeof Date.prototype.toString )); 1.24 +if (typeof Date.prototype['toString'] !== "function") $ERROR('#10: typeof Date.prototype["toString"] === "function". Actual: ' + (typeof Date.prototype["toString"] )); 1.25 +if (typeof Date.prototype.valueOf !== "function") $ERROR('#11: typeof Date.prototype.valueOf === "function". Actual: ' + (typeof Date.prototype.valueOf )); 1.26 +if (typeof Date.prototype['valueOf'] !== "function") $ERROR('#12: typeof Date.prototype["valueOf"] === "function". Actual: ' + (typeof Date.prototype["valueOf"] )); 1.27 +if (typeof Date.prototype.getTime !== "function") $ERROR('#13: typeof Date.prototype.getTime === "function". Actual: ' + (typeof Date.prototype.getTime )); 1.28 +if (typeof Date.prototype['getTime'] !== "function") $ERROR('#14: typeof Date.prototype["getTime"] === "function". Actual: ' + (typeof Date.prototype["getTime"] )); 1.29 +if (typeof Date.prototype.getFullYear !== "function") $ERROR('#17: typeof Date.prototype.getFullYear === "function". Actual: ' + (typeof Date.prototype.getFullYear )); 1.30 +if (typeof Date.prototype['getFullYear'] !== "function") $ERROR('#18: typeof Date.prototype["getFullYear"] === "function". Actual: ' + (typeof Date.prototype["getFullYear"] )); 1.31 +if (typeof Date.prototype.getUTCFullYear !== "function") $ERROR('#19: typeof Date.prototype.getUTCFullYear === "function". Actual: ' + (typeof Date.prototype.getUTCFullYear )); 1.32 +if (typeof Date.prototype['getUTCFullYear'] !== "function") $ERROR('#20: typeof Date.prototype["getUTCFullYear"] === "function". Actual: ' + (typeof Date.prototype["getUTCFullYear"] )); 1.33 +if (typeof Date.prototype.getMonth !== "function") $ERROR('#21: typeof Date.prototype.getMonth === "function". Actual: ' + (typeof Date.prototype.getMonth )); 1.34 +if (typeof Date.prototype['getMonth'] !== "function") $ERROR('#22: typeof Date.prototype["getMonth"] === "function". Actual: ' + (typeof Date.prototype["getMonth"] )); 1.35 +if (typeof Date.prototype.getUTCMonth !== "function") $ERROR('#23: typeof Date.prototype.getUTCMonth === "function". Actual: ' + (typeof Date.prototype.getUTCMonth )); 1.36 +if (typeof Date.prototype['getUTCMonth'] !== "function") $ERROR('#24: typeof Date.prototype["getUTCMonth"] === "function". Actual: ' + (typeof Date.prototype["getUTCMonth"] )); 1.37 +if (typeof Date.prototype.getDate !== "function") $ERROR('#25: typeof Date.prototype.getDate === "function". Actual: ' + (typeof Date.prototype.getDate )); 1.38 +if (typeof Date.prototype['getDate'] !== "function") $ERROR('#26: typeof Date.prototype["getDate"] === "function". Actual: ' + (typeof Date.prototype["getDate"] )); 1.39 +if (typeof Date.prototype.getUTCDate !== "function") $ERROR('#27: typeof Date.prototype.getUTCDate === "function". Actual: ' + (typeof Date.prototype.getUTCDate )); 1.40 +if (typeof Date.prototype['getUTCDate'] !== "function") $ERROR('#28: typeof Date.prototype["getUTCDate"] === "function". Actual: ' + (typeof Date.prototype["getUTCDate"] )); 1.41 +if (typeof Date.prototype.getDay !== "function") $ERROR('#29: typeof Date.prototype.getDay === "function". Actual: ' + (typeof Date.prototype.getDay )); 1.42 +if (typeof Date.prototype['getDay'] !== "function") $ERROR('#30: typeof Date.prototype["getDay"] === "function". Actual: ' + (typeof Date.prototype["getDay"] )); 1.43 +if (typeof Date.prototype.getUTCDay !== "function") $ERROR('#31: typeof Date.prototype.getUTCDay === "function". Actual: ' + (typeof Date.prototype.getUTCDay )); 1.44 +if (typeof Date.prototype['getUTCDay'] !== "function") $ERROR('#32: typeof Date.prototype["getUTCDay"] === "function". Actual: ' + (typeof Date.prototype["getUTCDay"] )); 1.45 +if (typeof Date.prototype.getHours !== "function") $ERROR('#33: typeof Date.prototype.getHours === "function". Actual: ' + (typeof Date.prototype.getHours )); 1.46 +if (typeof Date.prototype['getHours'] !== "function") $ERROR('#34: typeof Date.prototype["getHours"] === "function". Actual: ' + (typeof Date.prototype["getHours"] )); 1.47 +if (typeof Date.prototype.getUTCHours !== "function") $ERROR('#35: typeof Date.prototype.getUTCHours === "function". Actual: ' + (typeof Date.prototype.getUTCHours )); 1.48 +if (typeof Date.prototype['getUTCHours'] !== "function") $ERROR('#36: typeof Date.prototype["getUTCHours"] === "function". Actual: ' + (typeof Date.prototype["getUTCHours"] )); 1.49 +if (typeof Date.prototype.getMinutes !== "function") $ERROR('#37: typeof Date.prototype.getMinutes === "function". Actual: ' + (typeof Date.prototype.getMinutes )); 1.50 +if (typeof Date.prototype['getMinutes'] !== "function") $ERROR('#38: typeof Date.prototype["getMinutes"] === "function". Actual: ' + (typeof Date.prototype["getMinutes"] )); 1.51 +if (typeof Date.prototype.getUTCMinutes !== "function") $ERROR('#39: typeof Date.prototype.getUTCMinutes === "function". Actual: ' + (typeof Date.prototype.getUTCMinutes )); 1.52 +if (typeof Date.prototype['getUTCMinutes'] !== "function") $ERROR('#40: typeof Date.prototype["getUTCMinutes"] === "function". Actual: ' + (typeof Date.prototype["getUTCMinutes"] )); 1.53 +if (typeof Date.prototype.getSeconds !== "function") $ERROR('#41: typeof Date.prototype.getSeconds === "function". Actual: ' + (typeof Date.prototype.getSeconds )); 1.54 +if (typeof Date.prototype['getSeconds'] !== "function") $ERROR('#42: typeof Date.prototype["getSeconds"] === "function". Actual: ' + (typeof Date.prototype["getSeconds"] )); 1.55 +if (typeof Date.prototype.getUTCSeconds !== "function") $ERROR('#43: typeof Date.prototype.getUTCSeconds === "function". Actual: ' + (typeof Date.prototype.getUTCSeconds )); 1.56 +if (typeof Date.prototype['getUTCSeconds'] !== "function") $ERROR('#44: typeof Date.prototype["getUTCSeconds"] === "function". Actual: ' + (typeof Date.prototype["getUTCSeconds"] )); 1.57 +if (typeof Date.prototype.getMilliseconds !== "function") $ERROR('#45: typeof Date.prototype.getMilliseconds === "function". Actual: ' + (typeof Date.prototype.getMilliseconds )); 1.58 +if (typeof Date.prototype['getMilliseconds'] !== "function") $ERROR('#46: typeof Date.prototype["getMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["getMilliseconds"] )); 1.59 +if (typeof Date.prototype.getUTCMilliseconds !== "function") $ERROR('#47: typeof Date.prototype.getUTCMilliseconds === "function". Actual: ' + (typeof Date.prototype.getUTCMilliseconds )); 1.60 +if (typeof Date.prototype['getUTCMilliseconds'] !== "function") $ERROR('#48: typeof Date.prototype["getUTCMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["getUTCMilliseconds"] )); 1.61 +if (typeof Date.prototype.setTime !== "function") $ERROR('#49: typeof Date.prototype.setTime === "function". Actual: ' + (typeof Date.prototype.setTime )); 1.62 +if (typeof Date.prototype['setTime'] !== "function") $ERROR('#50: typeof Date.prototype["setTime"] === "function". Actual: ' + (typeof Date.prototype["setTime"] )); 1.63 +if (typeof Date.prototype.setMilliseconds !== "function") $ERROR('#51: typeof Date.prototype.setMilliseconds === "function". Actual: ' + (typeof Date.prototype.setMilliseconds )); 1.64 +if (typeof Date.prototype['setMilliseconds'] !== "function") $ERROR('#52: typeof Date.prototype["setMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["setMilliseconds"] )); 1.65 +if (typeof Date.prototype.setUTCMilliseconds !== "function") $ERROR('#53: typeof Date.prototype.setUTCMilliseconds === "function". Actual: ' + (typeof Date.prototype.setUTCMilliseconds )); 1.66 +if (typeof Date.prototype['setUTCMilliseconds'] !== "function") $ERROR('#54: typeof Date.prototype["setUTCMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["setUTCMilliseconds"] )); 1.67 +if (typeof Date.prototype.setSeconds !== "function") $ERROR('#55: typeof Date.prototype.setSeconds === "function". Actual: ' + (typeof Date.prototype.setSeconds )); 1.68 +if (typeof Date.prototype['setSeconds'] !== "function") $ERROR('#56: typeof Date.prototype["setSeconds"] === "function". Actual: ' + (typeof Date.prototype["setSeconds"] )); 1.69 +if (typeof Date.prototype.setUTCSeconds !== "function") $ERROR('#57: typeof Date.prototype.setUTCSeconds === "function". Actual: ' + (typeof Date.prototype.setUTCSeconds )); 1.70 +if (typeof Date.prototype['setUTCSeconds'] !== "function") $ERROR('#58: typeof Date.prototype["setUTCSeconds"] === "function". Actual: ' + (typeof Date.prototype["setUTCSeconds"] )); 1.71 +if (typeof Date.prototype.setMinutes !== "function") $ERROR('#59: typeof Date.prototype.setMinutes === "function". Actual: ' + (typeof Date.prototype.setMinutes )); 1.72 +if (typeof Date.prototype['setMinutes'] !== "function") $ERROR('#60: typeof Date.prototype["setMinutes"] === "function". Actual: ' + (typeof Date.prototype["setMinutes"] )); 1.73 +if (typeof Date.prototype.setUTCMinutes !== "function") $ERROR('#61: typeof Date.prototype.setUTCMinutes === "function". Actual: ' + (typeof Date.prototype.setUTCMinutes )); 1.74 +if (typeof Date.prototype['setUTCMinutes'] !== "function") $ERROR('#62: typeof Date.prototype["setUTCMinutes"] === "function". Actual: ' + (typeof Date.prototype["setUTCMinutes"] )); 1.75 +if (typeof Date.prototype.setHours !== "function") $ERROR('#63: typeof Date.prototype.setHours === "function". Actual: ' + (typeof Date.prototype.setHours )); 1.76 +if (typeof Date.prototype['setHours'] !== "function") $ERROR('#64: typeof Date.prototype["setHours"] === "function". Actual: ' + (typeof Date.prototype["setHours"] )); 1.77 +if (typeof Date.prototype.setUTCHours !== "function") $ERROR('#65: typeof Date.prototype.setUTCHours === "function". Actual: ' + (typeof Date.prototype.setUTCHours )); 1.78 +if (typeof Date.prototype['setUTCHours'] !== "function") $ERROR('#66: typeof Date.prototype["setUTCHours"] === "function". Actual: ' + (typeof Date.prototype["setUTCHours"] )); 1.79 +if (typeof Date.prototype.setDate !== "function") $ERROR('#67: typeof Date.prototype.setDate === "function". Actual: ' + (typeof Date.prototype.setDate )); 1.80 +if (typeof Date.prototype['setDate'] !== "function") $ERROR('#68: typeof Date.prototype["setDate"] === "function". Actual: ' + (typeof Date.prototype["setDate"] )); 1.81 +if (typeof Date.prototype.setUTCDate !== "function") $ERROR('#69: typeof Date.prototype.setUTCDate === "function". Actual: ' + (typeof Date.prototype.setUTCDate )); 1.82 +if (typeof Date.prototype['setUTCDate'] !== "function") $ERROR('#70: typeof Date.prototype["setUTCDate"] === "function". Actual: ' + (typeof Date.prototype["setUTCDate"] )); 1.83 +if (typeof Date.prototype.setMonth !== "function") $ERROR('#71: typeof Date.prototype.setMonth === "function". Actual: ' + (typeof Date.prototype.setMonth )); 1.84 +if (typeof Date.prototype['setMonth'] !== "function") $ERROR('#72: typeof Date.prototype["setMonth"] === "function". Actual: ' + (typeof Date.prototype["setMonth"] )); 1.85 +if (typeof Date.prototype.setUTCMonth !== "function") $ERROR('#73: typeof Date.prototype.setUTCMonth === "function". Actual: ' + (typeof Date.prototype.setUTCMonth )); 1.86 +if (typeof Date.prototype['setUTCMonth'] !== "function") $ERROR('#74: typeof Date.prototype["setUTCMonth"] === "function". Actual: ' + (typeof Date.prototype["setUTCMonth"] )); 1.87 +if (typeof Date.prototype.setFullYear !== "function") $ERROR('#75: typeof Date.prototype.setFullYear === "function". Actual: ' + (typeof Date.prototype.setFullYear )); 1.88 +if (typeof Date.prototype['setFullYear'] !== "function") $ERROR('#76: typeof Date.prototype["setFullYear"] === "function". Actual: ' + (typeof Date.prototype["setFullYear"] )); 1.89 +if (typeof Date.prototype.setUTCFullYear !== "function") $ERROR('#77: typeof Date.prototype.setUTCFullYear === "function". Actual: ' + (typeof Date.prototype.setUTCFullYear )); 1.90 +if (typeof Date.prototype['setUTCFullYear'] !== "function") $ERROR('#78: typeof Date.prototype["setUTCFullYear"] === "function". Actual: ' + (typeof Date.prototype["setUTCFullYear"] )); 1.91 +if (typeof Date.prototype.toLocaleString !== "function") $ERROR('#81: typeof Date.prototype.toLocaleString === "function". Actual: ' + (typeof Date.prototype.toLocaleString )); 1.92 +if (typeof Date.prototype['toLocaleString'] !== "function") $ERROR('#82: typeof Date.prototype["toLocaleString"] === "function". Actual: ' + (typeof Date.prototype["toLocaleString"] )); 1.93 +if (typeof Date.prototype.toUTCString !== "function") $ERROR('#83: typeof Date.prototype.toUTCString === "function". Actual: ' + (typeof Date.prototype.toUTCString )); 1.94 +if (typeof Date.prototype['toUTCString'] !== "function") $ERROR('#84: typeof Date.prototype["toUTCString"] === "function". Actual: ' + (typeof Date.prototype["toUTCString"] )); 1.95 + 1.96 + 1.97 +