fix tests for spec magic number/compression changes

This commit is contained in:
Brandon Liu
2022-10-05 10:46:05 +08:00
parent 41b53c2c12
commit 7526a4b8b6
4 changed files with 36 additions and 34 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -147,20 +147,20 @@ test("cache getHeader", async (assertion) => {
const source = new TestNodeFileSource("test/data/test_fixture_1.pmtiles", "1");
const cache = new SharedPromiseCache();
const header = await cache.getHeader(source);
assertion.eq(header.rootDirectoryOffset, 122);
assertion.eq(header.rootDirectoryOffset, 127);
assertion.eq(header.rootDirectoryLength, 25);
assertion.eq(header.jsonMetadataOffset, 147);
assertion.eq(header.jsonMetadataLength, 239);
assertion.eq(header.jsonMetadataOffset, 152);
assertion.eq(header.jsonMetadataLength, 247);
assertion.eq(header.leafDirectoryOffset, 0);
assertion.eq(header.leafDirectoryLength, 0);
assertion.eq(header.tileDataOffset, 386);
assertion.eq(header.tileDataOffset, 399);
assertion.eq(header.tileDataLength, 69);
assertion.eq(header.numAddressedTiles, 1);
assertion.eq(header.numTileEntries, 1);
assertion.eq(header.numTileContents, 1);
assertion.eq(header.clustered, false);
assertion.eq(header.internalCompression, 1);
assertion.eq(header.tileCompression, 1);
assertion.eq(header.internalCompression, 2);
assertion.eq(header.tileCompression, 2);
assertion.eq(header.tileType, 1);
assertion.eq(header.minZoom, 0);
assertion.eq(header.maxZoom, 0);