зеркало из https://github.com/mozilla/gecko-dev.git
Bug 543101: (Test-only change) When comparing filesystem timestamps to zip-file timestamps in zipwriter tests, truncate both values to second precision. r=dtownsend. CLOSED TREE
This commit is contained in:
Родитель
c33231cbcf
Коммит
0b0a7fe0c9
|
@ -58,6 +58,8 @@ const ZIP_METHOD_DEFLATE = 8
|
|||
const ZIP_EXTENDED_TIMESTAMP_SIZE = 9;
|
||||
|
||||
const PR_USEC_PER_MSEC = 1000;
|
||||
const PR_USEC_PER_SEC = 1000000;
|
||||
const PR_MSEC_PER_SEC = 1000;
|
||||
|
||||
const DATA_DIR = "data/";
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ var observer = {
|
|||
do_check_eq(entry.realSize, TESTS[i].size);
|
||||
do_check_eq(entry.size, TESTS[i].size);
|
||||
do_check_eq(entry.CRC32, TESTS[i].crc);
|
||||
do_check_eq(entry.lastModifiedTime / PR_USEC_PER_MSEC,
|
||||
source.lastModifiedTime);
|
||||
do_check_eq(Math.floor(entry.lastModifiedTime / PR_USEC_PER_SEC),
|
||||
Math.floor(source.lastModifiedTime / PR_MSEC_PER_SEC));
|
||||
|
||||
zipR.test(TESTS[i].name);
|
||||
}
|
||||
|
|
|
@ -80,8 +80,8 @@ function run_test()
|
|||
do_check_eq(entry.realSize, TESTS[i].size);
|
||||
do_check_eq(entry.size, TESTS[i].size);
|
||||
do_check_eq(entry.CRC32, TESTS[i].crc);
|
||||
do_check_eq(entry.lastModifiedTime / PR_USEC_PER_MSEC,
|
||||
source.lastModifiedTime);
|
||||
do_check_eq(Math.floor(entry.lastModifiedTime / PR_USEC_PER_SEC),
|
||||
Math.floor(source.lastModifiedTime / PR_MSEC_PER_SEC));
|
||||
|
||||
zipR.test(TESTS[i].name);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче