S15.9.3.1_A2_T4.js (6837B)
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: | 6 The [[Prototype]] property of the newly constructed object 7 is set to the original Date prototype object, the one that is the 8 initial value of Date.prototype 9 esid: sec-date-year-month-date-hours-minutes-seconds-ms 10 description: 5 arguments, (year, month, date, hours, minutes) 11 ---*/ 12 13 var x11 = new Date(1899, 11, 31, 23, 59); 14 15 assert.sameValue( 16 typeof x11.constructor.prototype, 17 "object", 18 'The value of `typeof x11.constructor.prototype` is expected to be "object"' 19 ); 20 21 var x12 = new Date(1899, 11, 31, 23, 59); 22 assert(Date.prototype.isPrototypeOf(x12), 'Date.prototype.isPrototypeOf(x12) must return true'); 23 24 var x13 = new Date(1899, 11, 31, 23, 59); 25 26 assert.sameValue( 27 Date.prototype, 28 x13.constructor.prototype, 29 'The value of Date.prototype is expected to equal the value of x13.constructor.prototype' 30 ); 31 32 var x21 = new Date(1899, 12, 1, 0, 0); 33 34 assert.sameValue( 35 typeof x21.constructor.prototype, 36 "object", 37 'The value of `typeof x21.constructor.prototype` is expected to be "object"' 38 ); 39 40 var x22 = new Date(1899, 12, 1, 0, 0); 41 assert(Date.prototype.isPrototypeOf(x22), 'Date.prototype.isPrototypeOf(x22) must return true'); 42 43 var x23 = new Date(1899, 12, 1, 0, 0); 44 45 assert.sameValue( 46 Date.prototype, 47 x23.constructor.prototype, 48 'The value of Date.prototype is expected to equal the value of x23.constructor.prototype' 49 ); 50 51 var x31 = new Date(1900, 0, 1, 0, 0); 52 53 assert.sameValue( 54 typeof x31.constructor.prototype, 55 "object", 56 'The value of `typeof x31.constructor.prototype` is expected to be "object"' 57 ); 58 59 var x32 = new Date(1900, 0, 1, 0, 0); 60 assert(Date.prototype.isPrototypeOf(x32), 'Date.prototype.isPrototypeOf(x32) must return true'); 61 62 var x33 = new Date(1900, 0, 1, 0, 0); 63 64 assert.sameValue( 65 Date.prototype, 66 x33.constructor.prototype, 67 'The value of Date.prototype is expected to equal the value of x33.constructor.prototype' 68 ); 69 70 var x41 = new Date(1969, 11, 31, 23, 59); 71 72 assert.sameValue( 73 typeof x41.constructor.prototype, 74 "object", 75 'The value of `typeof x41.constructor.prototype` is expected to be "object"' 76 ); 77 78 var x42 = new Date(1969, 11, 31, 23, 59); 79 assert(Date.prototype.isPrototypeOf(x42), 'Date.prototype.isPrototypeOf(x42) must return true'); 80 81 var x43 = new Date(1969, 11, 31, 23, 59); 82 83 assert.sameValue( 84 Date.prototype, 85 x43.constructor.prototype, 86 'The value of Date.prototype is expected to equal the value of x43.constructor.prototype' 87 ); 88 89 var x51 = new Date(1969, 12, 1, 0, 0); 90 91 assert.sameValue( 92 typeof x51.constructor.prototype, 93 "object", 94 'The value of `typeof x51.constructor.prototype` is expected to be "object"' 95 ); 96 97 var x52 = new Date(1969, 12, 1, 0, 0); 98 assert(Date.prototype.isPrototypeOf(x52), 'Date.prototype.isPrototypeOf(x52) must return true'); 99 100 var x53 = new Date(1969, 12, 1, 0, 0); 101 102 assert.sameValue( 103 Date.prototype, 104 x53.constructor.prototype, 105 'The value of Date.prototype is expected to equal the value of x53.constructor.prototype' 106 ); 107 108 var x61 = new Date(1970, 0, 1, 0, 0); 109 110 assert.sameValue( 111 typeof x61.constructor.prototype, 112 "object", 113 'The value of `typeof x61.constructor.prototype` is expected to be "object"' 114 ); 115 116 var x62 = new Date(1970, 0, 1, 0, 0); 117 assert(Date.prototype.isPrototypeOf(x62), 'Date.prototype.isPrototypeOf(x62) must return true'); 118 119 var x63 = new Date(1970, 0, 1, 0, 0); 120 121 assert.sameValue( 122 Date.prototype, 123 x63.constructor.prototype, 124 'The value of Date.prototype is expected to equal the value of x63.constructor.prototype' 125 ); 126 127 var x71 = new Date(1999, 11, 31, 23, 59); 128 129 assert.sameValue( 130 typeof x71.constructor.prototype, 131 "object", 132 'The value of `typeof x71.constructor.prototype` is expected to be "object"' 133 ); 134 135 var x72 = new Date(1999, 11, 31, 23, 59); 136 assert(Date.prototype.isPrototypeOf(x72), 'Date.prototype.isPrototypeOf(x72) must return true'); 137 138 var x73 = new Date(1999, 11, 31, 23, 59); 139 140 assert.sameValue( 141 Date.prototype, 142 x73.constructor.prototype, 143 'The value of Date.prototype is expected to equal the value of x73.constructor.prototype' 144 ); 145 146 var x81 = new Date(1999, 12, 1, 0, 0); 147 148 assert.sameValue( 149 typeof x81.constructor.prototype, 150 "object", 151 'The value of `typeof x81.constructor.prototype` is expected to be "object"' 152 ); 153 154 var x82 = new Date(1999, 12, 1, 0, 0); 155 assert(Date.prototype.isPrototypeOf(x82), 'Date.prototype.isPrototypeOf(x82) must return true'); 156 157 var x83 = new Date(1999, 12, 1, 0, 0); 158 159 assert.sameValue( 160 Date.prototype, 161 x83.constructor.prototype, 162 'The value of Date.prototype is expected to equal the value of x83.constructor.prototype' 163 ); 164 165 var x91 = new Date(2000, 0, 1, 0, 0); 166 167 assert.sameValue( 168 typeof x91.constructor.prototype, 169 "object", 170 'The value of `typeof x91.constructor.prototype` is expected to be "object"' 171 ); 172 173 var x92 = new Date(2000, 0, 1, 0, 0); 174 assert(Date.prototype.isPrototypeOf(x92), 'Date.prototype.isPrototypeOf(x92) must return true'); 175 176 var x93 = new Date(2000, 0, 1, 0, 0); 177 178 assert.sameValue( 179 Date.prototype, 180 x93.constructor.prototype, 181 'The value of Date.prototype is expected to equal the value of x93.constructor.prototype' 182 ); 183 184 var x101 = new Date(2099, 11, 31, 23, 59); 185 186 assert.sameValue( 187 typeof x101.constructor.prototype, 188 "object", 189 'The value of `typeof x101.constructor.prototype` is expected to be "object"' 190 ); 191 192 var x102 = new Date(2099, 11, 31, 23, 59); 193 assert(Date.prototype.isPrototypeOf(x102), 'Date.prototype.isPrototypeOf(x102) must return true'); 194 195 var x103 = new Date(2099, 11, 31, 23, 59); 196 197 assert.sameValue( 198 Date.prototype, 199 x103.constructor.prototype, 200 'The value of Date.prototype is expected to equal the value of x103.constructor.prototype' 201 ); 202 203 var x111 = new Date(2099, 12, 1, 0, 0); 204 205 assert.sameValue( 206 typeof x111.constructor.prototype, 207 "object", 208 'The value of `typeof x111.constructor.prototype` is expected to be "object"' 209 ); 210 211 var x112 = new Date(2099, 12, 1, 0, 0); 212 assert(Date.prototype.isPrototypeOf(x112), 'Date.prototype.isPrototypeOf(x112) must return true'); 213 214 var x113 = new Date(2099, 12, 1, 0, 0); 215 216 assert.sameValue( 217 Date.prototype, 218 x113.constructor.prototype, 219 'The value of Date.prototype is expected to equal the value of x113.constructor.prototype' 220 ); 221 222 var x121 = new Date(2100, 0, 1, 0, 0); 223 224 assert.sameValue( 225 typeof x121.constructor.prototype, 226 "object", 227 'The value of `typeof x121.constructor.prototype` is expected to be "object"' 228 ); 229 230 var x122 = new Date(2100, 0, 1, 0, 0); 231 assert(Date.prototype.isPrototypeOf(x122), 'Date.prototype.isPrototypeOf(x122) must return true'); 232 233 var x123 = new Date(2100, 0, 1, 0, 0); 234 235 assert.sameValue( 236 Date.prototype, 237 x123.constructor.prototype, 238 'The value of Date.prototype is expected to equal the value of x123.constructor.prototype' 239 ); 240 241 reportCompare(0, 0);