Debian Codegraph @

js/src/tests/test262/built-ins/Date/S15.9.3.1_A1_T1.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 When Date is called as part of a new expression it is
7 a constructor: it initializes the newly created object
8 esid: sec-date-year-month-date-hours-minutes-seconds-ms
9 description: 2 arguments, (year, month)
10 ---*/
11
12 assert.sameValue(
13 typeof new Date(1899, 11),
14 "object",
15 'The value of `typeof new Date(1899, 11)` is expected to be "object"'
16 );
17
18 assert.notSameValue(new Date(1899, 11), undefined, 'new Date(1899, 11) is expected to not equal ``undefined``');
19
20 var x13 = new Date(1899, 11);
21 assert.sameValue(typeof x13, "object", 'The value of `typeof x13` is expected to be "object"');
22
23 var x14 = new Date(1899, 11);
24 assert.notSameValue(x14, undefined, 'The value of x14 is expected to not equal ``undefined``');
25
26 assert.sameValue(
27 typeof new Date(1899, 12),
28 "object",
29 'The value of `typeof new Date(1899, 12)` is expected to be "object"'
30 );
31
32 assert.notSameValue(new Date(1899, 12), undefined, 'new Date(1899, 12) is expected to not equal ``undefined``');
33
34 var x23 = new Date(1899, 12);
35 assert.sameValue(typeof x23, "object", 'The value of `typeof x23` is expected to be "object"');
36
37 var x24 = new Date(1899, 12);
38 assert.notSameValue(x24, undefined, 'The value of x24 is expected to not equal ``undefined``');
39
40 assert.sameValue(
41 typeof new Date(1900, 0),
42 "object",
43 'The value of `typeof new Date(1900, 0)` is expected to be "object"'
44 );
45
46 assert.notSameValue(new Date(1900, 0), undefined, 'new Date(1900, 0) is expected to not equal ``undefined``');
47
48 var x33 = new Date(1900, 0);
49 assert.sameValue(typeof x33, "object", 'The value of `typeof x33` is expected to be "object"');
50
51 var x34 = new Date(1900, 0);
52 assert.notSameValue(x34, undefined, 'The value of x34 is expected to not equal ``undefined``');
53
54 assert.sameValue(
55 typeof new Date(1969, 11),
56 "object",
57 'The value of `typeof new Date(1969, 11)` is expected to be "object"'
58 );
59
60 assert.notSameValue(new Date(1969, 11), undefined, 'new Date(1969, 11) is expected to not equal ``undefined``');
61
62 var x43 = new Date(1969, 11);
63 assert.sameValue(typeof x43, "object", 'The value of `typeof x43` is expected to be "object"');
64
65 var x44 = new Date(1969, 11);
66 assert.notSameValue(x44, undefined, 'The value of x44 is expected to not equal ``undefined``');
67
68 assert.sameValue(
69 typeof new Date(1969, 12),
70 "object",
71 'The value of `typeof new Date(1969, 12)` is expected to be "object"'
72 );
73
74 assert.notSameValue(new Date(1969, 12), undefined, 'new Date(1969, 12) is expected to not equal ``undefined``');
75
76 var x53 = new Date(1969, 12);
77 assert.sameValue(typeof x53, "object", 'The value of `typeof x53` is expected to be "object"');
78
79 var x54 = new Date(1969, 12);
80 assert.notSameValue(x54, undefined, 'The value of x54 is expected to not equal ``undefined``');
81
82 assert.sameValue(
83 typeof new Date(1970, 0),
84 "object",
85 'The value of `typeof new Date(1970, 0)` is expected to be "object"'
86 );
87
88 assert.notSameValue(new Date(1970, 0), undefined, 'new Date(1970, 0) is expected to not equal ``undefined``');
89
90 var x63 = new Date(1970, 0);
91 assert.sameValue(typeof x63, "object", 'The value of `typeof x63` is expected to be "object"');
92
93 var x64 = new Date(1970, 0);
94 assert.notSameValue(x64, undefined, 'The value of x64 is expected to not equal ``undefined``');
95
96 assert.sameValue(
97 typeof new Date(1999, 11),
98 "object",
99 'The value of `typeof new Date(1999, 11)` is expected to be "object"'
100 );
101
102 assert.notSameValue(new Date(1999, 11), undefined, 'new Date(1999, 11) is expected to not equal ``undefined``');
103
104 var x73 = new Date(1999, 11);
105 assert.sameValue(typeof x73, "object", 'The value of `typeof x73` is expected to be "object"');
106
107 var x74 = new Date(1999, 11);
108 assert.notSameValue(x74, undefined, 'The value of x74 is expected to not equal ``undefined``');
109
110 assert.sameValue(
111 typeof new Date(1999, 12),
112 "object",
113 'The value of `typeof new Date(1999, 12)` is expected to be "object"'
114 );
115
116 assert.notSameValue(new Date(1999, 12), undefined, 'new Date(1999, 12) is expected to not equal ``undefined``');
117
118 var x83 = new Date(1999, 12);
119 assert.sameValue(typeof x83, "object", 'The value of `typeof x83` is expected to be "object"');
120
121 var x84 = new Date(1999, 12);
122 assert.notSameValue(x84, undefined, 'The value of x84 is expected to not equal ``undefined``');
123
124 assert.sameValue(
125 typeof new Date(2000, 0),
126 "object",
127 'The value of `typeof new Date(2000, 0)` is expected to be "object"'
128 );
129
130 assert.notSameValue(new Date(2000, 0), undefined, 'new Date(2000, 0) is expected to not equal ``undefined``');
131
132 var x93 = new Date(2000, 0);
133 assert.sameValue(typeof x93, "object", 'The value of `typeof x93` is expected to be "object"');
134
135 var x94 = new Date(2000, 0);
136 assert.notSameValue(x94, undefined, 'The value of x94 is expected to not equal ``undefined``');
137
138 assert.sameValue(
139 typeof new Date(2099, 11),
140 "object",
141 'The value of `typeof new Date(2099, 11)` is expected to be "object"'
142 );
143
144 assert.notSameValue(new Date(2099, 11), undefined, 'new Date(2099, 11) is expected to not equal ``undefined``');
145
146 var x103 = new Date(2099, 11);
147 assert.sameValue(typeof x103, "object", 'The value of `typeof x103` is expected to be "object"');
148
149 var x104 = new Date(2099, 11);
150 assert.notSameValue(x104, undefined, 'The value of x104 is expected to not equal ``undefined``');
151
152 assert.sameValue(
153 typeof new Date(2099, 12),
154 "object",
155 'The value of `typeof new Date(2099, 12)` is expected to be "object"'
156 );
157
158 assert.notSameValue(new Date(2099, 12), undefined, 'new Date(2099, 12) is expected to not equal ``undefined``');
159
160 var x113 = new Date(2099, 12);
161 assert.sameValue(typeof x113, "object", 'The value of `typeof x113` is expected to be "object"');
162
163 var x114 = new Date(2099, 12);
164 assert.notSameValue(x114, undefined, 'The value of x114 is expected to not equal ``undefined``');
165
166 assert.sameValue(
167 typeof new Date(2100, 0),
168 "object",
169 'The value of `typeof new Date(2100, 0)` is expected to be "object"'
170 );
171
172 assert.notSameValue(new Date(2100, 0), undefined, 'new Date(2100, 0) is expected to not equal ``undefined``');
173
174 var x123 = new Date(2100, 0);
175 assert.sameValue(typeof x123, "object", 'The value of `typeof x123` is expected to be "object"');
176
177 var x124 = new Date(2100, 0);
178 assert.notSameValue(x124, undefined, 'The value of x124 is expected to not equal ``undefined``');
179
180 reportCompare(0, 0);