Debian Codegraph @

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