Adjusting hard-coded Pacific timezone date testcases to work in any tester's timezone -

This commit is contained in:
pschwartau%netscape.com 2000-12-26 20:02:04 +00:00
Родитель d95b80f20b
Коммит eeb1f8d3a4
15 изменённых файлов: 55 добавлений и 37 удалений

Просмотреть файл

@ -85,8 +85,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = TZ_PST * msPerHour;
// Dates around 1970
@ -129,7 +129,7 @@ function getTestCases( ) {
addNewTestCase( new Date(1969,11,31,23,59,59,1000),
"new Date(1969,11,31,23,59,59,1000)",
[TIME_1970-TZ_ADJUST,1970,0,1,4,8,0,0,0,1970,0,1,4,0,0,0,0] );
/*
// Dates around 2000
addNewTestCase( new Date( 1999,11,31,15,59,59,999),
@ -202,7 +202,7 @@ function getTestCases( ) {
addNewTestCase( new Date(2004,11,31,16,0,0,0),
"new Date(2004,11,31,16,0,0,0)",
[UTC_YEAR_2005,2005,0,1,6,0,0,0,0,2004,11,31,5,16,0,0,0] );
*/
/*
This test case is incorrect. Need to fix the DaylightSavings functions in
shell.js for this to work properly.
@ -232,7 +232,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
var item = testcases.length;
@ -258,6 +259,7 @@ function addNewTestCase( DateCase, DateString, ResultArray ) {
testcases[item++] = new TestCase( SECTION, DateString+".getMilliseconds()", ResultArray[MS], DateCase.getMilliseconds() );
}
function test() {
for( tc = 0; tc < testcases.length; tc++ ) {

Просмотреть файл

@ -85,8 +85,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = TZ_PST * msPerHour;
// Dates around 2000
@ -190,7 +190,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
var item = testcases.length;

Просмотреть файл

@ -85,8 +85,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = TZ_PST * msPerHour;
// Dates around 29 Feb 2000
@ -168,7 +168,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
var item = testcases.length;

Просмотреть файл

@ -85,8 +85,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = TZ_PST * msPerHour;
// Dates around 1900
@ -152,7 +152,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
var item = testcases.length;

Просмотреть файл

@ -85,8 +85,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = TZ_PST * msPerHour;
// Dates around 2005
@ -129,7 +129,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
var item = testcases.length;

Просмотреть файл

@ -199,8 +199,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
item = testcases.length;

Просмотреть файл

@ -177,8 +177,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
item = testcases.length;

Просмотреть файл

@ -163,8 +163,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
item = testcases.length;

Просмотреть файл

@ -146,8 +146,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
item = testcases.length;

Просмотреть файл

@ -128,8 +128,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray);
item = testcases.length;

Просмотреть файл

@ -90,7 +90,9 @@
test();
function getTestCases( ) {
var TZ_ADJUST = -TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = -TZ_PST * msPerHour;
// Dates around 1970
addNewTestCase( new Date(0),
@ -257,7 +259,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray, 'msMode');
item = testcases.length;

Просмотреть файл

@ -90,7 +90,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = -TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = -TZ_PST * msPerHour;
addNewTestCase( new Date((new Date(0)).toUTCString()),
"new Date(\""+ (new Date(0)).toUTCString()+"\" )",
@ -233,7 +234,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray, 'msMode');
item = testcases.length;

Просмотреть файл

@ -90,7 +90,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = -TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = -TZ_PST * msPerHour;
// Dates around 2000
@ -211,7 +212,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray, 'msMode');
item = testcases.length;

Просмотреть файл

@ -90,7 +90,8 @@
test();
function getTestCases( ) {
var TZ_ADJUST = -TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = -TZ_PST * msPerHour;
// Dates around Feb 29, 2000
@ -180,7 +181,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray, 'msMode');
item = testcases.length;

Просмотреть файл

@ -90,7 +90,9 @@
test();
function getTestCases( ) {
var TZ_ADJUST = -TZ_DIFF * msPerHour;
// all the "ResultArrays" below are hard-coded to Pacific Standard Time values -
var TZ_ADJUST = -TZ_PST * msPerHour;
// Dates around 1900
@ -147,7 +149,8 @@ function getTestCases( ) {
}
function addNewTestCase( DateCase, DateString, ResultArray ) {
DateCase = DateCase;
//adjust hard-coded ResultArray for tester's timezone instead of PST
adjustResultArray(ResultArray, 'msMode');
item = testcases.length;