| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: Check type of various properties |
| 6 |
es5id: 11.2.1_A4_T9 |
| 7 |
description: Checking properties of the Date object |
| 8 |
---*/ |
| 9 |
|
| 10 |
//CHECK#1-86 |
| 11 |
if (typeof Date.parse !== "function") throw new Test262Error('#1: typeof Date.parse === "function". Actual: ' + (typeof Date.parse )); |
| 12 |
if (typeof Date['parse'] !== "function") throw new Test262Error('#2: typeof Date["parse"] === "function". Actual: ' + (typeof Date["parse"] )); |
| 13 |
if (typeof Date.prototype !== "object") throw new Test262Error('#3: typeof Date.prototype === "object". Actual: ' + (typeof Date.prototype )); |
| 14 |
if (typeof Date['prototype'] !== "object") throw new Test262Error('#4: typeof Date["prototype"] === "object". Actual: ' + (typeof Date["prototype"] )); |
| 15 |
if (typeof Date.UTC !== "function") throw new Test262Error('#5: typeof Date.UTC === "function". Actual: ' + (typeof Date.UTC )); |
| 16 |
if (typeof Date['UTC'] !== "function") throw new Test262Error('#6: typeof Date["UTC"] === "function". Actual: ' + (typeof Date["UTC"] )); |
| 17 |
if (typeof Date.prototype.constructor !== "function") throw new Test262Error('#7: typeof Date.prototype.constructor === "funvtion". Actual: ' + (typeof Date.prototype.constructor )); |
| 18 |
if (typeof Date.prototype['constructor'] !== "function") throw new Test262Error('#8: typeof Date.prototype["constructor"] === "function". Actual: ' + (typeof Date.prototype["constructor"] )); |
| 19 |
if (typeof Date.prototype.toString !== "function") throw new Test262Error('#9: typeof Date.prototype.toString === "function". Actual: ' + (typeof Date.prototype.toString )); |
| 20 |
if (typeof Date.prototype['toString'] !== "function") throw new Test262Error('#10: typeof Date.prototype["toString"] === "function". Actual: ' + (typeof Date.prototype["toString"] )); |
| 21 |
if (typeof Date.prototype.valueOf !== "function") throw new Test262Error('#11: typeof Date.prototype.valueOf === "function". Actual: ' + (typeof Date.prototype.valueOf )); |
| 22 |
if (typeof Date.prototype['valueOf'] !== "function") throw new Test262Error('#12: typeof Date.prototype["valueOf"] === "function". Actual: ' + (typeof Date.prototype["valueOf"] )); |
| 23 |
if (typeof Date.prototype.getTime !== "function") throw new Test262Error('#13: typeof Date.prototype.getTime === "function". Actual: ' + (typeof Date.prototype.getTime )); |
| 24 |
if (typeof Date.prototype['getTime'] !== "function") throw new Test262Error('#14: typeof Date.prototype["getTime"] === "function". Actual: ' + (typeof Date.prototype["getTime"] )); |
| 25 |
if (typeof Date.prototype.getFullYear !== "function") throw new Test262Error('#17: typeof Date.prototype.getFullYear === "function". Actual: ' + (typeof Date.prototype.getFullYear )); |
| 26 |
if (typeof Date.prototype['getFullYear'] !== "function") throw new Test262Error('#18: typeof Date.prototype["getFullYear"] === "function". Actual: ' + (typeof Date.prototype["getFullYear"] )); |
| 27 |
if (typeof Date.prototype.getUTCFullYear !== "function") throw new Test262Error('#19: typeof Date.prototype.getUTCFullYear === "function". Actual: ' + (typeof Date.prototype.getUTCFullYear )); |
| 28 |
if (typeof Date.prototype['getUTCFullYear'] !== "function") throw new Test262Error('#20: typeof Date.prototype["getUTCFullYear"] === "function". Actual: ' + (typeof Date.prototype["getUTCFullYear"] )); |
| 29 |
if (typeof Date.prototype.getMonth !== "function") throw new Test262Error('#21: typeof Date.prototype.getMonth === "function". Actual: ' + (typeof Date.prototype.getMonth )); |
| 30 |
if (typeof Date.prototype['getMonth'] !== "function") throw new Test262Error('#22: typeof Date.prototype["getMonth"] === "function". Actual: ' + (typeof Date.prototype["getMonth"] )); |
| 31 |
if (typeof Date.prototype.getUTCMonth !== "function") throw new Test262Error('#23: typeof Date.prototype.getUTCMonth === "function". Actual: ' + (typeof Date.prototype.getUTCMonth )); |
| 32 |
if (typeof Date.prototype['getUTCMonth'] !== "function") throw new Test262Error('#24: typeof Date.prototype["getUTCMonth"] === "function". Actual: ' + (typeof Date.prototype["getUTCMonth"] )); |
| 33 |
if (typeof Date.prototype.getDate !== "function") throw new Test262Error('#25: typeof Date.prototype.getDate === "function". Actual: ' + (typeof Date.prototype.getDate )); |
| 34 |
if (typeof Date.prototype['getDate'] !== "function") throw new Test262Error('#26: typeof Date.prototype["getDate"] === "function". Actual: ' + (typeof Date.prototype["getDate"] )); |
| 35 |
if (typeof Date.prototype.getUTCDate !== "function") throw new Test262Error('#27: typeof Date.prototype.getUTCDate === "function". Actual: ' + (typeof Date.prototype.getUTCDate )); |
| 36 |
if (typeof Date.prototype['getUTCDate'] !== "function") throw new Test262Error('#28: typeof Date.prototype["getUTCDate"] === "function". Actual: ' + (typeof Date.prototype["getUTCDate"] )); |
| 37 |
if (typeof Date.prototype.getDay !== "function") throw new Test262Error('#29: typeof Date.prototype.getDay === "function". Actual: ' + (typeof Date.prototype.getDay )); |
| 38 |
if (typeof Date.prototype['getDay'] !== "function") throw new Test262Error('#30: typeof Date.prototype["getDay"] === "function". Actual: ' + (typeof Date.prototype["getDay"] )); |
| 39 |
if (typeof Date.prototype.getUTCDay !== "function") throw new Test262Error('#31: typeof Date.prototype.getUTCDay === "function". Actual: ' + (typeof Date.prototype.getUTCDay )); |
| 40 |
if (typeof Date.prototype['getUTCDay'] !== "function") throw new Test262Error('#32: typeof Date.prototype["getUTCDay"] === "function". Actual: ' + (typeof Date.prototype["getUTCDay"] )); |
| 41 |
if (typeof Date.prototype.getHours !== "function") throw new Test262Error('#33: typeof Date.prototype.getHours === "function". Actual: ' + (typeof Date.prototype.getHours )); |
| 42 |
if (typeof Date.prototype['getHours'] !== "function") throw new Test262Error('#34: typeof Date.prototype["getHours"] === "function". Actual: ' + (typeof Date.prototype["getHours"] )); |
| 43 |
if (typeof Date.prototype.getUTCHours !== "function") throw new Test262Error('#35: typeof Date.prototype.getUTCHours === "function". Actual: ' + (typeof Date.prototype.getUTCHours )); |
| 44 |
if (typeof Date.prototype['getUTCHours'] !== "function") throw new Test262Error('#36: typeof Date.prototype["getUTCHours"] === "function". Actual: ' + (typeof Date.prototype["getUTCHours"] )); |
| 45 |
if (typeof Date.prototype.getMinutes !== "function") throw new Test262Error('#37: typeof Date.prototype.getMinutes === "function". Actual: ' + (typeof Date.prototype.getMinutes )); |
| 46 |
if (typeof Date.prototype['getMinutes'] !== "function") throw new Test262Error('#38: typeof Date.prototype["getMinutes"] === "function". Actual: ' + (typeof Date.prototype["getMinutes"] )); |
| 47 |
if (typeof Date.prototype.getUTCMinutes !== "function") throw new Test262Error('#39: typeof Date.prototype.getUTCMinutes === "function". Actual: ' + (typeof Date.prototype.getUTCMinutes )); |
| 48 |
if (typeof Date.prototype['getUTCMinutes'] !== "function") throw new Test262Error('#40: typeof Date.prototype["getUTCMinutes"] === "function". Actual: ' + (typeof Date.prototype["getUTCMinutes"] )); |
| 49 |
if (typeof Date.prototype.getSeconds !== "function") throw new Test262Error('#41: typeof Date.prototype.getSeconds === "function". Actual: ' + (typeof Date.prototype.getSeconds )); |
| 50 |
if (typeof Date.prototype['getSeconds'] !== "function") throw new Test262Error('#42: typeof Date.prototype["getSeconds"] === "function". Actual: ' + (typeof Date.prototype["getSeconds"] )); |
| 51 |
if (typeof Date.prototype.getUTCSeconds !== "function") throw new Test262Error('#43: typeof Date.prototype.getUTCSeconds === "function". Actual: ' + (typeof Date.prototype.getUTCSeconds )); |
| 52 |
if (typeof Date.prototype['getUTCSeconds'] !== "function") throw new Test262Error('#44: typeof Date.prototype["getUTCSeconds"] === "function". Actual: ' + (typeof Date.prototype["getUTCSeconds"] )); |
| 53 |
if (typeof Date.prototype.getMilliseconds !== "function") throw new Test262Error('#45: typeof Date.prototype.getMilliseconds === "function". Actual: ' + (typeof Date.prototype.getMilliseconds )); |
| 54 |
if (typeof Date.prototype['getMilliseconds'] !== "function") throw new Test262Error('#46: typeof Date.prototype["getMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["getMilliseconds"] )); |
| 55 |
if (typeof Date.prototype.getUTCMilliseconds !== "function") throw new Test262Error('#47: typeof Date.prototype.getUTCMilliseconds === "function". Actual: ' + (typeof Date.prototype.getUTCMilliseconds )); |
| 56 |
if (typeof Date.prototype['getUTCMilliseconds'] !== "function") throw new Test262Error('#48: typeof Date.prototype["getUTCMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["getUTCMilliseconds"] )); |
| 57 |
if (typeof Date.prototype.setTime !== "function") throw new Test262Error('#49: typeof Date.prototype.setTime === "function". Actual: ' + (typeof Date.prototype.setTime )); |
| 58 |
if (typeof Date.prototype['setTime'] !== "function") throw new Test262Error('#50: typeof Date.prototype["setTime"] === "function". Actual: ' + (typeof Date.prototype["setTime"] )); |
| 59 |
if (typeof Date.prototype.setMilliseconds !== "function") throw new Test262Error('#51: typeof Date.prototype.setMilliseconds === "function". Actual: ' + (typeof Date.prototype.setMilliseconds )); |
| 60 |
if (typeof Date.prototype['setMilliseconds'] !== "function") throw new Test262Error('#52: typeof Date.prototype["setMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["setMilliseconds"] )); |
| 61 |
if (typeof Date.prototype.setUTCMilliseconds !== "function") throw new Test262Error('#53: typeof Date.prototype.setUTCMilliseconds === "function". Actual: ' + (typeof Date.prototype.setUTCMilliseconds )); |
| 62 |
if (typeof Date.prototype['setUTCMilliseconds'] !== "function") throw new Test262Error('#54: typeof Date.prototype["setUTCMilliseconds"] === "function". Actual: ' + (typeof Date.prototype["setUTCMilliseconds"] )); |
| 63 |
if (typeof Date.prototype.setSeconds !== "function") throw new Test262Error('#55: typeof Date.prototype.setSeconds === "function". Actual: ' + (typeof Date.prototype.setSeconds )); |
| 64 |
if (typeof Date.prototype['setSeconds'] !== "function") throw new Test262Error('#56: typeof Date.prototype["setSeconds"] === "function". Actual: ' + (typeof Date.prototype["setSeconds"] )); |
| 65 |
if (typeof Date.prototype.setUTCSeconds !== "function") throw new Test262Error('#57: typeof Date.prototype.setUTCSeconds === "function". Actual: ' + (typeof Date.prototype.setUTCSeconds )); |
| 66 |
if (typeof Date.prototype['setUTCSeconds'] !== "function") throw new Test262Error('#58: typeof Date.prototype["setUTCSeconds"] === "function". Actual: ' + (typeof Date.prototype["setUTCSeconds"] )); |
| 67 |
if (typeof Date.prototype.setMinutes !== "function") throw new Test262Error('#59: typeof Date.prototype.setMinutes === "function". Actual: ' + (typeof Date.prototype.setMinutes )); |
| 68 |
if (typeof Date.prototype['setMinutes'] !== "function") throw new Test262Error('#60: typeof Date.prototype["setMinutes"] === "function". Actual: ' + (typeof Date.prototype["setMinutes"] )); |
| 69 |
if (typeof Date.prototype.setUTCMinutes !== "function") throw new Test262Error('#61: typeof Date.prototype.setUTCMinutes === "function". Actual: ' + (typeof Date.prototype.setUTCMinutes )); |
| 70 |
if (typeof Date.prototype['setUTCMinutes'] !== "function") throw new Test262Error('#62: typeof Date.prototype["setUTCMinutes"] === "function". Actual: ' + (typeof Date.prototype["setUTCMinutes"] )); |
| 71 |
if (typeof Date.prototype.setHours !== "function") throw new Test262Error('#63: typeof Date.prototype.setHours === "function". Actual: ' + (typeof Date.prototype.setHours )); |
| 72 |
if (typeof Date.prototype['setHours'] !== "function") throw new Test262Error('#64: typeof Date.prototype["setHours"] === "function". Actual: ' + (typeof Date.prototype["setHours"] )); |
| 73 |
if (typeof Date.prototype.setUTCHours !== "function") throw new Test262Error('#65: typeof Date.prototype.setUTCHours === "function". Actual: ' + (typeof Date.prototype.setUTCHours )); |
| 74 |
if (typeof Date.prototype['setUTCHours'] !== "function") throw new Test262Error('#66: typeof Date.prototype["setUTCHours"] === "function". Actual: ' + (typeof Date.prototype["setUTCHours"] )); |
| 75 |
if (typeof Date.prototype.setDate !== "function") throw new Test262Error('#67: typeof Date.prototype.setDate === "function". Actual: ' + (typeof Date.prototype.setDate )); |
| 76 |
if (typeof Date.prototype['setDate'] !== "function") throw new Test262Error('#68: typeof Date.prototype["setDate"] === "function". Actual: ' + (typeof Date.prototype["setDate"] )); |
| 77 |
if (typeof Date.prototype.setUTCDate !== "function") throw new Test262Error('#69: typeof Date.prototype.setUTCDate === "function". Actual: ' + (typeof Date.prototype.setUTCDate )); |
| 78 |
if (typeof Date.prototype['setUTCDate'] !== "function") throw new Test262Error('#70: typeof Date.prototype["setUTCDate"] === "function". Actual: ' + (typeof Date.prototype["setUTCDate"] )); |
| 79 |
if (typeof Date.prototype.setMonth !== "function") throw new Test262Error('#71: typeof Date.prototype.setMonth === "function". Actual: ' + (typeof Date.prototype.setMonth )); |
| 80 |
if (typeof Date.prototype['setMonth'] !== "function") throw new Test262Error('#72: typeof Date.prototype["setMonth"] === "function". Actual: ' + (typeof Date.prototype["setMonth"] )); |
| 81 |
if (typeof Date.prototype.setUTCMonth !== "function") throw new Test262Error('#73: typeof Date.prototype.setUTCMonth === "function". Actual: ' + (typeof Date.prototype.setUTCMonth )); |
| 82 |
if (typeof Date.prototype['setUTCMonth'] !== "function") throw new Test262Error('#74: typeof Date.prototype["setUTCMonth"] === "function". Actual: ' + (typeof Date.prototype["setUTCMonth"] )); |
| 83 |
if (typeof Date.prototype.setFullYear !== "function") throw new Test262Error('#75: typeof Date.prototype.setFullYear === "function". Actual: ' + (typeof Date.prototype.setFullYear )); |
| 84 |
if (typeof Date.prototype['setFullYear'] !== "function") throw new Test262Error('#76: typeof Date.prototype["setFullYear"] === "function". Actual: ' + (typeof Date.prototype["setFullYear"] )); |
| 85 |
if (typeof Date.prototype.setUTCFullYear !== "function") throw new Test262Error('#77: typeof Date.prototype.setUTCFullYear === "function". Actual: ' + (typeof Date.prototype.setUTCFullYear )); |
| 86 |
if (typeof Date.prototype['setUTCFullYear'] !== "function") throw new Test262Error('#78: typeof Date.prototype["setUTCFullYear"] === "function". Actual: ' + (typeof Date.prototype["setUTCFullYear"] )); |
| 87 |
if (typeof Date.prototype.toLocaleString !== "function") throw new Test262Error('#81: typeof Date.prototype.toLocaleString === "function". Actual: ' + (typeof Date.prototype.toLocaleString )); |
| 88 |
if (typeof Date.prototype['toLocaleString'] !== "function") throw new Test262Error('#82: typeof Date.prototype["toLocaleString"] === "function". Actual: ' + (typeof Date.prototype["toLocaleString"] )); |
| 89 |
if (typeof Date.prototype.toUTCString !== "function") throw new Test262Error('#83: typeof Date.prototype.toUTCString === "function". Actual: ' + (typeof Date.prototype.toUTCString )); |
| 90 |
if (typeof Date.prototype['toUTCString'] !== "function") throw new Test262Error('#84: typeof Date.prototype["toUTCString"] === "function". Actual: ' + (typeof Date.prototype["toUTCString"] )); |
| 91 |
|
| 92 |
reportCompare(0, 0); |