| OLD | NEW |
| 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."); | 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."); |
| 2 | 2 |
| 3 var functionNames = [ | 3 var functionNames = [ |
| 4 "Date.prototype.toString", | 4 "Date.prototype.toString", |
| 5 "Date.prototype.toDateString", | 5 "Date.prototype.toDateString", |
| 6 "Date.prototype.toTimeString", | 6 "Date.prototype.toTimeString", |
| 7 "Date.prototype.toGMTString", | 7 "Date.prototype.toGMTString", |
| 8 "Date.prototype.toUTCString", | 8 "Date.prototype.toUTCString", |
| 9 "Date.prototype.toLocaleString", | 9 "Date.prototype.toLocaleString", |
| 10 "Date.prototype.toLocaleDateString", | 10 "Date.prototype.toLocaleDateString", |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 "Date.prototype.setDate", | 29 "Date.prototype.setDate", |
| 30 "Date.prototype.setMonth", | 30 "Date.prototype.setMonth", |
| 31 "Date.prototype.setFullYear", | 31 "Date.prototype.setFullYear", |
| 32 "Date.prototype.setYear" | 32 "Date.prototype.setYear" |
| 33 ]; | 33 ]; |
| 34 | 34 |
| 35 var o = new Object(); | 35 var o = new Object(); |
| 36 for (var i = 0; i < functionNames.length; i++) { | 36 for (var i = 0; i < functionNames.length; i++) { |
| 37 var testFunctionName = "o.__proto__." + functionNames[i].split('.')[2]; | 37 var testFunctionName = "o.__proto__." + functionNames[i].split('.')[2]; |
| 38 eval(testFunctionName + " = " + functionNames[i]); | 38 eval(testFunctionName + " = " + functionNames[i]); |
| 39 shouldThrow(testFunctionName + "()", '"TypeError: Type error"'); | 39 shouldThrow(testFunctionName + "()"); |
| 40 } | 40 } |
| OLD | NEW |