mirror of https://github.com/tc39/test262.git
Fixed https://bugs.ecmascript.org/show_bug.cgi?id=293. ConstructDate cannot be
salvaged (e.g., need locale info to properly predict whether we're subject to DST).
This commit is contained in:
parent
d67ef0cb5e
commit
d6634f8e10
|
@ -771,6 +771,9 @@ function TimeClip(time) {
|
|||
}
|
||||
|
||||
//Test Functions
|
||||
//ConstructDate is considered deprecated, and should not be used directly from
|
||||
//test262 tests as it's incredibly sensitive to DST start/end dates that
|
||||
//vary with geographic location.
|
||||
function ConstructDate(year, month, date, hours, minutes, seconds, ms){
|
||||
/*
|
||||
* 1. Call ToNumber(year)
|
||||
|
@ -804,7 +807,8 @@ function ConstructDate(year, month, date, hours, minutes, seconds, ms){
|
|||
var r10 = MakeTime(r4, r5, r6, r7);
|
||||
var r11 = MakeDate(r9, r10);
|
||||
|
||||
return TimeClip(UTC(r11));
|
||||
var retVal = TimeClip(UTC(r11));
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,53 +19,53 @@
|
|||
$INCLUDE("environment.js");
|
||||
$INCLUDE("numeric_conversion.js");
|
||||
$INCLUDE("Date_constants.js");
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (ConstructDate(1899, 11) !== new Date(1899, 11).valueOf()) {
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (-2211638400000 !== new Date(1899, 11).valueOf()) {
|
||||
$FAIL("#1: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1899, 12) !== new Date(1899, 12).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1899, 12).valueOf()) {
|
||||
$FAIL("#2: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1900, 0) !== new Date(1900, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1900, 0).valueOf()) {
|
||||
$FAIL("#3: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 11) !== new Date(1969, 11).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2649600000 !== new Date(1969, 11).valueOf()) {
|
||||
$FAIL("#4: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 12) !== new Date(1969, 12).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1969, 12).valueOf()) {
|
||||
$FAIL("#5: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1970, 0) !== new Date(1970, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1970, 0).valueOf()) {
|
||||
$FAIL("#6: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 11) !== new Date(1999, 11).valueOf()) {
|
||||
}
|
||||
|
||||
if (944035200000 !== new Date(1999, 11).valueOf()) {
|
||||
$FAIL("#7: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 12) !== new Date(1999, 12).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(1999, 12).valueOf()) {
|
||||
$FAIL("#8: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2000, 0) !== new Date(2000, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(2000, 0).valueOf()) {
|
||||
$FAIL("#9: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 11) !== new Date(2099, 11).valueOf()) {
|
||||
}
|
||||
|
||||
if (4099795200000 !== new Date(2099, 11).valueOf()) {
|
||||
$FAIL("#10: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 12) !== new Date(2099, 12).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2099, 12).valueOf()) {
|
||||
$FAIL("#11: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2100, 0) !== new Date(2100, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2100, 0).valueOf()) {
|
||||
$FAIL("#12: Incorrect value of Date");
|
||||
}
|
||||
|
||||
|
|
|
@ -19,53 +19,53 @@
|
|||
$INCLUDE("environment.js");
|
||||
$INCLUDE("numeric_conversion.js");
|
||||
$INCLUDE("Date_constants.js");
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (ConstructDate(1899, 11, 31) !== new Date(1899, 11, 31).valueOf()) {
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (-2209046400000 !== new Date(1899, 11, 31).valueOf()) {
|
||||
$FAIL("#1: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1899, 12, 1) !== new Date(1899, 12, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1899, 12, 1).valueOf()) {
|
||||
$FAIL("#2: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1900, 0, 1) !== new Date(1900, 0, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1900, 0, 1).valueOf()) {
|
||||
$FAIL("#3: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 11, 31) !== new Date(1969, 11, 31).valueOf()) {
|
||||
}
|
||||
|
||||
if (-57600000 !== new Date(1969, 11, 31).valueOf()) {
|
||||
$FAIL("#4: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 12, 1) !== new Date(1969, 12, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1969, 12, 1).valueOf()) {
|
||||
$FAIL("#5: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1970, 0, 1) !== new Date(1970, 0, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1970, 0, 1).valueOf()) {
|
||||
$FAIL("#6: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 11, 31) !== new Date(1999, 11, 31).valueOf()) {
|
||||
}
|
||||
|
||||
if (946627200000 !== new Date(1999, 11, 31).valueOf()) {
|
||||
$FAIL("#7: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 12, 1) !== new Date(1999, 12, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(1999, 12, 1).valueOf()) {
|
||||
$FAIL("#8: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2000, 0, 1) !== new Date(2000, 0, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(2000, 0, 1).valueOf()) {
|
||||
$FAIL("#9: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 11, 31) !== new Date(2099, 11, 31).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102387200000 !== new Date(2099, 11, 31).valueOf()) {
|
||||
$FAIL("#10: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 12, 1) !== new Date(2099, 12, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2099, 12, 1).valueOf()) {
|
||||
$FAIL("#11: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2100, 0, 1) !== new Date(2100, 0, 1).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2100, 0, 1).valueOf()) {
|
||||
$FAIL("#12: Incorrect value of Date");
|
||||
}
|
||||
|
||||
|
|
|
@ -19,53 +19,53 @@
|
|||
$INCLUDE("environment.js");
|
||||
$INCLUDE("numeric_conversion.js");
|
||||
$INCLUDE("Date_constants.js");
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (ConstructDate(1899, 11, 31, 23) !== new Date(1899, 11, 31, 23).valueOf()) {
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (-2208963600000 !== new Date(1899, 11, 31, 23).valueOf()) {
|
||||
$FAIL("#1: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1899, 12, 1, 0) !== new Date(1899, 12, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1899, 12, 1, 0).valueOf()) {
|
||||
$FAIL("#2: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1900, 0, 1, 0) !== new Date(1900, 0, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1900, 0, 1, 0).valueOf()) {
|
||||
$FAIL("#3: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 11, 31, 23) !== new Date(1969, 11, 31, 23).valueOf()) {
|
||||
}
|
||||
|
||||
if (25200000 !== new Date(1969, 11, 31, 23).valueOf()) {
|
||||
$FAIL("#4: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 12, 1, 0) !== new Date(1969, 12, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1969, 12, 1, 0).valueOf()) {
|
||||
$FAIL("#5: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1970, 0, 1, 0) !== new Date(1970, 0, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1970, 0, 1, 0).valueOf()) {
|
||||
$FAIL("#6: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 11, 31, 23) !== new Date(1999, 11, 31, 23).valueOf()) {
|
||||
}
|
||||
|
||||
if (946710000000 !== new Date(1999, 11, 31, 23).valueOf()) {
|
||||
$FAIL("#7: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 12, 1, 0) !== new Date(1999, 12, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(1999, 12, 1, 0).valueOf()) {
|
||||
$FAIL("#8: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2000, 0, 1, 0) !== new Date(2000, 0, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(2000, 0, 1, 0).valueOf()) {
|
||||
$FAIL("#9: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 11, 31, 23) !== new Date(2099, 11, 31, 23).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102470000000 !== new Date(2099, 11, 31, 23).valueOf()) {
|
||||
$FAIL("#10: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 12, 1, 0) !== new Date(2099, 12, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2099, 12, 1, 0).valueOf()) {
|
||||
$FAIL("#11: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2100, 0, 1, 0) !== new Date(2100, 0, 1, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2100, 0, 1, 0).valueOf()) {
|
||||
$FAIL("#12: Incorrect value of Date");
|
||||
}
|
||||
|
||||
|
|
|
@ -19,53 +19,53 @@
|
|||
$INCLUDE("environment.js");
|
||||
$INCLUDE("numeric_conversion.js");
|
||||
$INCLUDE("Date_constants.js");
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (ConstructDate(1899, 11, 31, 23, 59) !== new Date(1899, 11, 31, 23, 59).valueOf()) {
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (-2208960060000 !== new Date(1899, 11, 31, 23, 59).valueOf()) {
|
||||
$FAIL("#1: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1899, 12, 1, 0, 0) !== new Date(1899, 12, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1899, 12, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#2: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1900, 0, 1, 0, 0) !== new Date(1900, 0, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1900, 0, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#3: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 11, 31, 23, 59) !== new Date(1969, 11, 31, 23, 59).valueOf()) {
|
||||
}
|
||||
|
||||
if (28740000 !== new Date(1969, 11, 31, 23, 59).valueOf()) {
|
||||
$FAIL("#4: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 12, 1, 0, 0) !== new Date(1969, 12, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1969, 12, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#5: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1970, 0, 1, 0, 0) !== new Date(1970, 0, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1970, 0, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#6: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 11, 31, 23, 59) !== new Date(1999, 11, 31, 23, 59).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713540000 !== new Date(1999, 11, 31, 23, 59).valueOf()) {
|
||||
$FAIL("#7: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 12, 1, 0, 0) !== new Date(1999, 12, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(1999, 12, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#8: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2000, 0, 1, 0, 0) !== new Date(2000, 0, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(2000, 0, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#9: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 11, 31, 23, 59) !== new Date(2099, 11, 31, 23, 59).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473540000 !== new Date(2099, 11, 31, 23, 59).valueOf()) {
|
||||
$FAIL("#10: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 12, 1, 0, 0) !== new Date(2099, 12, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2099, 12, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#11: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2100, 0, 1, 0, 0) !== new Date(2100, 0, 1, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2100, 0, 1, 0, 0).valueOf()) {
|
||||
$FAIL("#12: Incorrect value of Date");
|
||||
}
|
||||
|
||||
|
|
|
@ -19,53 +19,53 @@
|
|||
$INCLUDE("environment.js");
|
||||
$INCLUDE("numeric_conversion.js");
|
||||
$INCLUDE("Date_constants.js");
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (ConstructDate(1899, 11, 31, 23, 59, 59) !== new Date(1899, 11, 31, 23, 59, 59).valueOf()) {
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (-2208960001000 !== new Date(1899, 11, 31, 23, 59, 59).valueOf()) {
|
||||
$FAIL("#1: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1899, 12, 1, 0, 0, 0) !== new Date(1899, 12, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1899, 12, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#2: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1900, 0, 1, 0, 0, 0) !== new Date(1900, 0, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1900, 0, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#3: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 11, 31, 23, 59, 59) !== new Date(1969, 11, 31, 23, 59, 59).valueOf()) {
|
||||
}
|
||||
|
||||
if (28799000 !== new Date(1969, 11, 31, 23, 59, 59).valueOf()) {
|
||||
$FAIL("#4: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 12, 1, 0, 0, 0) !== new Date(1969, 12, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1969, 12, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#5: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1970, 0, 1, 0, 0, 0) !== new Date(1970, 0, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1970, 0, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#6: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 11, 31, 23, 59, 59) !== new Date(1999, 11, 31, 23, 59, 59).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713599000 !== new Date(1999, 11, 31, 23, 59, 59).valueOf()) {
|
||||
$FAIL("#7: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 12, 1, 0, 0, 0) !== new Date(1999, 12, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(1999, 12, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#8: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2000, 0, 1, 0, 0, 0) !== new Date(2000, 0, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(2000, 0, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#9: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 11, 31, 23, 59, 59) !== new Date(2099, 11, 31, 23, 59, 59).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473599000 !== new Date(2099, 11, 31, 23, 59, 59).valueOf()) {
|
||||
$FAIL("#10: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 12, 1, 0, 0, 0) !== new Date(2099, 12, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2099, 12, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#11: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2100, 0, 1, 0, 0, 0) !== new Date(2100, 0, 1, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2100, 0, 1, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#12: Incorrect value of Date");
|
||||
}
|
||||
|
||||
|
|
|
@ -19,53 +19,53 @@
|
|||
$INCLUDE("environment.js");
|
||||
$INCLUDE("numeric_conversion.js");
|
||||
$INCLUDE("Date_constants.js");
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (ConstructDate(1899, 11, 31, 23, 59, 59, 999) !== new Date(1899, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
$INCLUDE("Date_library.js");
|
||||
|
||||
if (-2208960000001 !== new Date(1899, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
$FAIL("#1: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1899, 12, 1, 0, 0, 0, 0) !== new Date(1899, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1899, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#2: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1900, 0, 1, 0, 0, 0, 0) !== new Date(1900, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (-2208960000000 !== new Date(1900, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#3: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 11, 31, 23, 59, 59, 999) !== new Date(1969, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
}
|
||||
|
||||
if (28799999 !== new Date(1969, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
$FAIL("#4: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1969, 12, 1, 0, 0, 0, 0) !== new Date(1969, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1969, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#5: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1970, 0, 1, 0, 0, 0, 0) !== new Date(1970, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (28800000 !== new Date(1970, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#6: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 11, 31, 23, 59, 59, 999) !== new Date(1999, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713599999 !== new Date(1999, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
$FAIL("#7: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(1999, 12, 1, 0, 0, 0, 0) !== new Date(1999, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(1999, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#8: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2000, 0, 1, 0, 0, 0, 0) !== new Date(2000, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (946713600000 !== new Date(2000, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#9: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 11, 31, 23, 59, 59, 999) !== new Date(2099, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473599999 !== new Date(2099, 11, 31, 23, 59, 59, 999).valueOf()) {
|
||||
$FAIL("#10: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2099, 12, 1, 0, 0, 0, 0) !== new Date(2099, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2099, 12, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#11: Incorrect value of Date");
|
||||
}
|
||||
|
||||
if (ConstructDate(2100, 0, 1, 0, 0, 0, 0) !== new Date(2100, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
}
|
||||
|
||||
if (4102473600000 !== new Date(2100, 0, 1, 0, 0, 0, 0).valueOf()) {
|
||||
$FAIL("#12: Incorrect value of Date");
|
||||
}
|
||||
|
||||
|
|
|
@ -771,6 +771,9 @@ function TimeClip(time) {
|
|||
}
|
||||
|
||||
//Test Functions
|
||||
//ConstructDate is considered deprecated, and should not be used directly from
|
||||
//test262 tests as it's incredibly sensitive to DST start/end dates that
|
||||
//vary with geographic location.
|
||||
function ConstructDate(year, month, date, hours, minutes, seconds, ms){
|
||||
/*
|
||||
* 1. Call ToNumber(year)
|
||||
|
@ -804,7 +807,8 @@ function ConstructDate(year, month, date, hours, minutes, seconds, ms){
|
|||
var r10 = MakeTime(r4, r5, r6, r7);
|
||||
var r11 = MakeDate(r9, r10);
|
||||
|
||||
return TimeClip(UTC(r11));
|
||||
var retVal = TimeClip(UTC(r11));
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":11563,"testSuite":["json/ch07.json","json/ch08.json","json/ch09.json","json/ch10.json","json/ch11.json","json/ch12.json","json/ch13.json","json/ch14.json","json/ch15.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":11563,"testSuite":["json/ch07.json","json/ch08.json","json/ch09.json","json/ch10.json","json/ch11.json","json/ch12.json","json/ch13.json","json/ch14.json","json/ch15.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":20,"testSuite":["json/bestPractice.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":20,"testSuite":["json/bestPractice.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":715,"testSuite":["json/ch07.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":715,"testSuite":["json/ch07.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":182,"testSuite":["json/ch08.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":182,"testSuite":["json/ch08.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":128,"testSuite":["json/ch09.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":128,"testSuite":["json/ch09.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":372,"testSuite":["json/ch10.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":372,"testSuite":["json/ch10.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":1320,"testSuite":["json/ch11.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":1320,"testSuite":["json/ch11.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":521,"testSuite":["json/ch12.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":521,"testSuite":["json/ch12.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":230,"testSuite":["json/ch13.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":230,"testSuite":["json/ch13.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":24,"testSuite":["json/ch14.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":24,"testSuite":["json/ch14.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":8071,"testSuite":["json/ch15.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":8071,"testSuite":["json/ch15.json"],"version":"ES5.1"}
|
|
@ -1 +1 @@
|
|||
{"date":"2012-03-08","numTests":1,"testSuite":["json/intl402.json"],"version":"ES5.1"}
|
||||
{"date":"2012-03-26","numTests":1,"testSuite":["json/intl402.json"],"version":"ES5.1"}
|
Loading…
Reference in New Issue