Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Date/S15.9.3.1_A3_T5.1.js

raw
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-year-month-date-hours-minutes-seconds-ms
9 es5id: 15.9.3.1_A3_T5.1
10 description: 6 arguments, (year, month, date, hours, minutes, seconds)
11 ---*/
12
13 var x1 = new Date(1899, 11, 31, 23, 59, 59);
14 if (Object.prototype.toString.call(x1) !== "[object Date]") {
15 $ERROR("#1: The [[Class]] property of the newly constructed object is set to 'Date'");
16 }
17
18 var x2 = new Date(1899, 12, 1, 0, 0, 0);
19 if (Object.prototype.toString.call(x2) !== "[object Date]") {
20 $ERROR("#2: The [[Class]] property of the newly constructed object is set to 'Date'");
21 }
22
23 var x3 = new Date(1900, 0, 1, 0, 0, 0);
24 if (Object.prototype.toString.call(x3) !== "[object Date]") {
25 $ERROR("#3: The [[Class]] property of the newly constructed object is set to 'Date'");
26 }
27
28 var x4 = new Date(1969, 11, 31, 23, 59, 59);
29 if (Object.prototype.toString.call(x4) !== "[object Date]") {
30 $ERROR("#4: The [[Class]] property of the newly constructed object is set to 'Date'");
31 }
32
33 var x5 = new Date(1969, 12, 1, 0, 0, 0);
34 if (Object.prototype.toString.call(x5) !== "[object Date]") {
35 $ERROR("#5: The [[Class]] property of the newly constructed object is set to 'Date'");
36 }
37
38 var x6 = new Date(1970, 0, 1, 0, 0, 0);
39 if (Object.prototype.toString.call(x6) !== "[object Date]") {
40 $ERROR("#6: The [[Class]] property of the newly constructed object is set to 'Date'");
41 }
42
43 var x7 = new Date(1999, 11, 31, 23, 59, 59);
44 if (Object.prototype.toString.call(x7) !== "[object Date]") {
45 $ERROR("#7: The [[Class]] property of the newly constructed object is set to 'Date'");
46 }
47
48 var x8 = new Date(1999, 12, 1, 0, 0, 0);
49 if (Object.prototype.toString.call(x8) !== "[object Date]") {
50 $ERROR("#8: The [[Class]] property of the newly constructed object is set to 'Date'");
51 }
52
53 var x9 = new Date(2000, 0, 1, 0, 0, 0);
54 if (Object.prototype.toString.call(x9) !== "[object Date]") {
55 $ERROR("#9: The [[Class]] property of the newly constructed object is set to 'Date'");
56 }
57
58 var x10 = new Date(2099, 11, 31, 23, 59, 59);
59 if (Object.prototype.toString.call(x10) !== "[object Date]") {
60 $ERROR("#10: The [[Class]] property of the newly constructed object is set to 'Date'");
61 }
62
63 var x11 = new Date(2099, 12, 1, 0, 0, 0);
64 if (Object.prototype.toString.call(x11) !== "[object Date]") {
65 $ERROR("#11: The [[Class]] property of the newly constructed object is set to 'Date'");
66 }
67
68 var x12 = new Date(2100, 0, 1, 0, 0, 0);
69 if (Object.prototype.toString.call(x12) !== "[object Date]") {
70 $ERROR("#12: The [[Class]] property of the newly constructed object is set to 'Date'");
71 }