| 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 [[Class]] property of the newly constructed object |
| 7 |
is set to "Date" |
| 8 |
esid: sec-date-value |
| 9 |
es5id: 15.9.3.2_A3_T1.1 |
| 10 |
description: Test based on delete prototype.toString |
| 11 |
includes: [dateConstants.js] |
| 12 |
---*/ |
| 13 |
|
| 14 |
var x1 = new Date(date_1899_end); |
| 15 |
if (Object.prototype.toString.call(x1) !== "[object Date]") { |
| 16 |
$ERROR("#1: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 17 |
} |
| 18 |
|
| 19 |
var x2 = new Date(date_1900_start); |
| 20 |
if (Object.prototype.toString.call(x2) !== "[object Date]") { |
| 21 |
$ERROR("#2: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 22 |
} |
| 23 |
|
| 24 |
var x3 = new Date(date_1969_end); |
| 25 |
if (Object.prototype.toString.call(x3) !== "[object Date]") { |
| 26 |
$ERROR("#3: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 27 |
} |
| 28 |
|
| 29 |
var x4 = new Date(date_1970_start); |
| 30 |
if (Object.prototype.toString.call(x4) !== "[object Date]") { |
| 31 |
$ERROR("#4: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 32 |
} |
| 33 |
|
| 34 |
var x5 = new Date(date_1999_end); |
| 35 |
if (Object.prototype.toString.call(x5) !== "[object Date]") { |
| 36 |
$ERROR("#5: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 37 |
} |
| 38 |
|
| 39 |
var x6 = new Date(date_2000_start); |
| 40 |
if (Object.prototype.toString.call(x6) !== "[object Date]") { |
| 41 |
$ERROR("#6: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 42 |
} |
| 43 |
|
| 44 |
var x7 = new Date(date_2099_end); |
| 45 |
if (Object.prototype.toString.call(x7) !== "[object Date]") { |
| 46 |
$ERROR("#7: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 47 |
} |
| 48 |
|
| 49 |
var x8 = new Date(date_2100_start); |
| 50 |
if (Object.prototype.toString.call(x8) !== "[object Date]") { |
| 51 |
$ERROR("#8: The [[Class]] property of the newly constructed object is set to 'Date'"); |
| 52 |
} |