2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
When Date is called as part of a new expression it is
|
|
|
|
a constructor: it initialises the newly created object
|
2017-07-27 23:24:39 +02:00
|
|
|
esid: sec-date-value
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 15.9.3.2_A1_T1
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Checking types of newly created objects and it values
|
2017-06-23 17:06:32 +02:00
|
|
|
includes: [dateConstants.js]
|
2014-07-22 01:09:02 +02:00
|
|
|
---*/
|
|
|
|
|
2011-09-07 08:35:18 +02:00
|
|
|
if (typeof new Date(date_1899_end) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#1.1: typeof new Date(date_1899_end) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_1899_end) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#1.2: new Date(date_1899_end) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x13 = new Date(date_1899_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x13 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#1.3: typeof new Date(date_1899_end) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x14 = new Date(date_1899_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x14 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#1.4: new Date(date_1899_end) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof new Date(date_1900_start) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#2.1: typeof new Date(date_1900_start) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_1900_start) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#2.2: new Date(date_1900_start) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x23 = new Date(date_1900_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x23 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#2.3: typeof new Date(date_1900_start) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x24 = new Date(date_1900_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x24 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#2.4: new Date(date_1900_start) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof new Date(date_1969_end) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#3.1: typeof new Date(date_1969_end) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_1969_end) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#3.2: new Date(date_1969_end) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x33 = new Date(date_1969_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x33 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#3.3: typeof new Date(date_1969_end) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x34 = new Date(date_1969_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x34 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#3.4: new Date(date_1969_end) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof new Date(date_1970_start) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#4.1: typeof new Date(date_1970_start) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_1970_start) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#4.2: new Date(date_1970_start) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x43 = new Date(date_1970_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x43 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#4.3: typeof new Date(date_1970_start) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x44 = new Date(date_1970_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x44 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#4.4: new Date(date_1970_start) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof new Date(date_1999_end) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#5.1: typeof new Date(date_1999_end) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_1999_end) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#5.2: new Date(date_1999_end) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x53 = new Date(date_1999_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x53 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#5.3: typeof new Date(date_1999_end) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x54 = new Date(date_1999_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x54 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#5.4: new Date(date_1999_end) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof new Date(date_2000_start) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#6.1: typeof new Date(date_2000_start) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_2000_start) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#6.2: new Date(date_2000_start) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x63 = new Date(date_2000_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x63 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#6.3: typeof new Date(date_2000_start) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x64 = new Date(date_2000_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x64 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#6.4: new Date(date_2000_start) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof new Date(date_2099_end) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#7.1: typeof new Date(date_2099_end) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_2099_end) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#7.2: new Date(date_2099_end) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x73 = new Date(date_2099_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x73 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#7.3: typeof new Date(date_2099_end) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x74 = new Date(date_2099_end);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x74 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#7.4: new Date(date_2099_end) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof new Date(date_2100_start) !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#8.1: typeof new Date(date_2100_start) === 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (new Date(date_2100_start) === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#8.2: new Date(date_2100_start) === undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x83 = new Date(date_2100_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (typeof x83 !== "object") {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#8.3: typeof new Date(date_2100_start) !== 'object'");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var x84 = new Date(date_2100_start);
|
2018-02-15 22:40:26 +01:00
|
|
|
if (x84 === undefined) {
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#8.4: new Date(date_2100_start) !== undefined");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|