1 description("This test verifies that the functions of the Date prototype object are not generic, as documented in ECMA-262 rev3 section 15.9.5 Properties of the Date Prototype Object.");
4 "Date.prototype.toString",
5 "Date.prototype.toDateString",
6 "Date.prototype.toTimeString",
7 "Date.prototype.toGMTString",
8 "Date.prototype.toUTCString",
9 "Date.prototype.toLocaleString",
10 "Date.prototype.toLocaleDateString",
11 "Date.prototype.toLocaleTimeString",
12 // "Date.prototype.valueOf", --> This line seems to confuse JavaScriptCore
13 "Date.prototype.getTime",
14 "Date.prototype.getYear",
15 "Date.prototype.getFullYear",
16 "Date.prototype.getMonth",
17 "Date.prototype.getDate",
18 "Date.prototype.getDay",
19 "Date.prototype.getHours",
20 "Date.prototype.getMinutes",
21 "Date.prototype.getSeconds",
22 "Date.prototype.getMilliseconds",
23 "Date.prototype.getTimezoneOffset",
24 "Date.prototype.setTime",
25 "Date.prototype.setMilliseconds",
26 "Date.prototype.setSeconds",
27 "Date.prototype.setMinutes",
28 "Date.prototype.setHours",
29 "Date.prototype.setDate",
30 "Date.prototype.setMonth",
31 "Date.prototype.setFullYear",
32 "Date.prototype.setYear"
36 for (var i
= 0; i
< functionNames
.length
; i
++) {
37 var testFunctionName
= "o.__proto__." + functionNames
[i
].split('.')[2];
38 eval(testFunctionName
+ " = " + functionNames
[i
]);
39 shouldThrow(testFunctionName
+ "()", '"TypeError: Type error"');