summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Date/S15.9.3.1_A1_T4.js
blob: 6857c3fc74631a834a9663bbe43797c18fcb8e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: |
    When Date is called as part of a new expression it is
    a constructor: it initializes the newly created object
esid: sec-date-year-month-date-hours-minutes-seconds-ms
description: 5 arguments, (year, month, date, hours, minutes)
---*/

if (typeof new Date(1899, 11, 31, 23, 59) !== "object") {
  $ERROR("#1.1: typeof new Date(1899, 11, 31, 23, 59) should be 'object'");
}

if (new Date(1899, 11, 31, 23, 59) === undefined) {
  $ERROR("#1.2: new Date(1899, 11, 31, 23, 59) should not be undefined");
}

var x13 = new Date(1899, 11, 31, 23, 59);
if (typeof x13 !== "object") {
  $ERROR("#1.3: typeof new Date(1899, 11, 31, 23, 59) should be 'object'");
}

var x14 = new Date(1899, 11, 31, 23, 59);
if (x14 === undefined) {
  $ERROR("#1.4: new Date(1899, 11, 31, 23, 59) should not be undefined");
}

if (typeof new Date(1899, 12, 1, 0, 0) !== "object") {
  $ERROR("#2.1: typeof new Date(1899, 12, 1, 0, 0) should be 'object'");
}

if (new Date(1899, 12, 1, 0, 0) === undefined) {
  $ERROR("#2.2: new Date(1899, 12, 1, 0, 0) should not be undefined");
}

var x23 = new Date(1899, 12, 1, 0, 0);
if (typeof x23 !== "object") {
  $ERROR("#2.3: typeof new Date(1899, 12, 1, 0, 0) should be 'object'");
}

var x24 = new Date(1899, 12, 1, 0, 0);
if (x24 === undefined) {
  $ERROR("#2.4: new Date(1899, 12, 1, 0, 0) should not be undefined");
}

if (typeof new Date(1900, 0, 1, 0, 0) !== "object") {
  $ERROR("#3.1: typeof new Date(1900, 0, 1, 0, 0) should be 'object'");
}

if (new Date(1900, 0, 1, 0, 0) === undefined) {
  $ERROR("#3.2: new Date(1900, 0, 1, 0, 0) should not be undefined");
}

var x33 = new Date(1900, 0, 1, 0, 0);
if (typeof x33 !== "object") {
  $ERROR("#3.3: typeof new Date(1900, 0, 1, 0, 0) should be 'object'");
}

var x34 = new Date(1900, 0, 1, 0, 0);
if (x34 === undefined) {
  $ERROR("#3.4: new Date(1900, 0, 1, 0, 0) should not be undefined");
}

if (typeof new Date(1969, 11, 31, 23, 59) !== "object") {
  $ERROR("#4.1: typeof new Date(1969, 11, 31, 23, 59) should be 'object'");
}

if (new Date(1969, 11, 31, 23, 59) === undefined) {
  $ERROR("#4.2: new Date(1969, 11, 31, 23, 59) should not be undefined");
}

var x43 = new Date(1969, 11, 31, 23, 59);
if (typeof x43 !== "object") {
  $ERROR("#4.3: typeof new Date(1969, 11, 31, 23, 59) should be 'object'");
}

var x44 = new Date(1969, 11, 31, 23, 59);
if (x44 === undefined) {
  $ERROR("#4.4: new Date(1969, 11, 31, 23, 59) should not be undefined");
}

if (typeof new Date(1969, 12, 1, 0, 0) !== "object") {
  $ERROR("#5.1: typeof new Date(1969, 12, 1, 0, 0) should be 'object'");
}

if (new Date(1969, 12, 1, 0, 0) === undefined) {
  $ERROR("#5.2: new Date(1969, 12, 1, 0, 0) should not be undefined");
}

var x53 = new Date(1969, 12, 1, 0, 0);
if (typeof x53 !== "object") {
  $ERROR("#5.3: typeof new Date(1969, 12, 1, 0, 0) should be 'object'");
}

var x54 = new Date(1969, 12, 1, 0, 0);
if (x54 === undefined) {
  $ERROR("#5.4: new Date(1969, 12, 1, 0, 0) should not be undefined");
}

if (typeof new Date(1970, 0, 1, 0, 0) !== "object") {
  $ERROR("#6.1: typeof new Date(1970, 0, 1, 0, 0) should be 'object'");
}

if (new Date(1970, 0, 1, 0, 0) === undefined) {
  $ERROR("#6.2: new Date(1970, 0, 1, 0, 0) should not be undefined");
}

var x63 = new Date(1970, 0, 1, 0, 0);
if (typeof x63 !== "object") {
  $ERROR("#6.3: typeof new Date(1970, 0, 1, 0, 0) should be 'object'");
}

var x64 = new Date(1970, 0, 1, 0, 0);
if (x64 === undefined) {
  $ERROR("#6.4: new Date(1970, 0, 1, 0, 0) should not be undefined");
}

if (typeof new Date(1999, 11, 31, 23, 59) !== "object") {
  $ERROR("#7.1: typeof new Date(1999, 11, 31, 23, 59) should be 'object'");
}

if (new Date(1999, 11, 31, 23, 59) === undefined) {
  $ERROR("#7.2: new Date(1999, 11, 31, 23, 59) should not be undefined");
}

var x73 = new Date(1999, 11, 31, 23, 59);
if (typeof x73 !== "object") {
  $ERROR("#7.3: typeof new Date(1999, 11, 31, 23, 59) should be 'object'");
}

var x74 = new Date(1999, 11, 31, 23, 59);
if (x74 === undefined) {
  $ERROR("#7.4: new Date(1999, 11, 31, 23, 59) should not be undefined");
}

if (typeof new Date(1999, 12, 1, 0, 0) !== "object") {
  $ERROR("#8.1: typeof new Date(1999, 12, 1, 0, 0) should be 'object'");
}

if (new Date(1999, 12, 1, 0, 0) === undefined) {
  $ERROR("#8.2: new Date(1999, 12, 1, 0, 0) should not be undefined");
}

var x83 = new Date(1999, 12, 1, 0, 0);
if (typeof x83 !== "object") {
  $ERROR("#8.3: typeof new Date(1999, 12, 1, 0, 0) should be 'object'");
}

var x84 = new Date(1999, 12, 1, 0, 0);
if (x84 === undefined) {
  $ERROR("#8.4: new Date(1999, 12, 1, 0, 0) should not be undefined");
}

if (typeof new Date(2000, 0, 1, 0, 0) !== "object") {
  $ERROR("#9.1: typeof new Date(2000, 0, 1, 0, 0) should be 'object'");
}

if (new Date(2000, 0, 1, 0, 0) === undefined) {
  $ERROR("#9.2: new Date(2000, 0, 1, 0, 0) should not be undefined");
}

var x93 = new Date(2000, 0, 1, 0, 0);
if (typeof x93 !== "object") {
  $ERROR("#9.3: typeof new Date(2000, 0, 1, 0, 0) should be 'object'");
}

var x94 = new Date(2000, 0, 1, 0, 0);
if (x94 === undefined) {
  $ERROR("#9.4: new Date(2000, 0, 1, 0, 0) should not be undefined");
}

if (typeof new Date(2099, 11, 31, 23, 59) !== "object") {
  $ERROR("#10.1: typeof new Date(2099, 11, 31, 23, 59) should be 'object'");
}

if (new Date(2099, 11, 31, 23, 59) === undefined) {
  $ERROR("#10.2: new Date(2099, 11, 31, 23, 59) should not be undefined");
}

var x103 = new Date(2099, 11, 31, 23, 59);
if (typeof x103 !== "object") {
  $ERROR("#10.3: typeof new Date(2099, 11, 31, 23, 59) should be 'object'");
}

var x104 = new Date(2099, 11, 31, 23, 59);
if (x104 === undefined) {
  $ERROR("#10.4: new Date(2099, 11, 31, 23, 59) should not be undefined");
}

if (typeof new Date(2099, 12, 1, 0, 0) !== "object") {
  $ERROR("#11.1: typeof new Date(2099, 12, 1, 0, 0) should be 'object'");
}

if (new Date(2099, 12, 1, 0, 0) === undefined) {
  $ERROR("#11.2: new Date(2099, 12, 1, 0, 0) should not be undefined");
}

var x113 = new Date(2099, 12, 1, 0, 0);
if (typeof x113 !== "object") {
  $ERROR("#11.3: typeof new Date(2099, 12, 1, 0, 0) should be 'object'");
}

var x114 = new Date(2099, 12, 1, 0, 0);
if (x114 === undefined) {
  $ERROR("#11.4: new Date(2099, 12, 1, 0, 0) should not be undefined");
}

if (typeof new Date(2100, 0, 1, 0, 0) !== "object") {
  $ERROR("#12.1: typeof new Date(2100, 0, 1, 0, 0) should be 'object'");
}

if (new Date(2100, 0, 1, 0, 0) === undefined) {
  $ERROR("#12.2: new Date(2100, 0, 1, 0, 0) should not be undefined");
}

var x123 = new Date(2100, 0, 1, 0, 0);
if (typeof x123 !== "object") {
  $ERROR("#12.3: typeof new Date(2100, 0, 1, 0, 0) should be 'object'");
}

var x124 = new Date(2100, 0, 1, 0, 0);
if (x124 === undefined) {
  $ERROR("#12.4: new Date(2100, 0, 1, 0, 0) should not be undefined");
}

reportCompare(0, 0);