diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-23 11:52:12 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-26 10:30:55 -0700 |
commit | a79d2afe1b43d9fa42e00629c4e07d9463d30d91 (patch) | |
tree | 41821fe578e1e9f7448d1d122d6d405bdc898201 /test/algorithm | |
parent | 8ac03f3870f3aa40edaaa05e1b97344a9e16733f (diff) | |
download | qtlocation-mapboxgl-a79d2afe1b43d9fa42e00629c4e07d9463d30d91.tar.gz |
[core] Rename data ⇢ tile; use Resource::Necessity
Diffstat (limited to 'test/algorithm')
-rw-r--r-- | test/algorithm/update_renderables.cpp | 237 |
1 files changed, 116 insertions, 121 deletions
diff --git a/test/algorithm/update_renderables.cpp b/test/algorithm/update_renderables.cpp index dcc43a83f3..c284c37475 100644 --- a/test/algorithm/update_renderables.cpp +++ b/test/algorithm/update_renderables.cpp @@ -43,14 +43,9 @@ std::ostream& operator<<(std::ostream& os, const CreateTileDataAction& action) { << action.tileID.canonical.y << " } } }"; } -enum Necessity : bool { - Optional = false, - Required = true, -}; - struct RetainTileDataAction { const OverscaledTileID tileID; - const Necessity necessity; + const Resource::Necessity necessity; bool operator==(const RetainTileDataAction& rhs) const { return tileID == rhs.tileID && necessity == rhs.necessity; @@ -61,7 +56,7 @@ std::ostream& operator<<(std::ostream& os, const RetainTileDataAction& action) { return os << "RetainTileDataAction{ { " << int(action.tileID.overscaledZ) << ", { " << int(action.tileID.canonical.z) << ", " << action.tileID.canonical.x << ", " << action.tileID.canonical.y << " } }, " - << (action.necessity == Required ? "Required" : "Optional") << " }"; + << (action.necessity == Resource::Necessity::Required ? "Required" : "Optional") << " }"; } struct RenderTileAction { @@ -106,8 +101,8 @@ auto createTileDataFn(ActionLog& log, T& dataTiles) { } auto retainTileDataFn(ActionLog& log) { - return [&](auto& tileData, bool required) { - log.emplace_back(RetainTileDataAction{ tileData.tileID, required ? Required : Optional }); + return [&](auto& tileData, Resource::Necessity necessity) { + log.emplace_back(RetainTileDataAction{ tileData.tileID, necessity }); }; } @@ -135,7 +130,7 @@ TEST(UpdateRenderables, SingleTile) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 1, 1 } }, Found }, // found ideal tile - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 1, 1 }, *tile_1_1_1_1 }, // render ideal tile }), log); @@ -146,7 +141,7 @@ TEST(UpdateRenderables, SingleTile) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 1, 1 } }, Found }, // found ideal tile - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 1, 1 }, *tile_1_1_1_1 }, // render ideal tile }), log); @@ -159,7 +154,7 @@ TEST(UpdateRenderables, SingleTile) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 1 } }, NotFound }, // missing ideal tile CreateTileDataAction{ { 1, { 1, 0, 1 } } }, // create ideal tile - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 2 } }, NotFound }, // four child tiles GetTileDataAction{ { 2, { 2, 0, 3 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 2 } }, NotFound }, // ... @@ -167,7 +162,7 @@ TEST(UpdateRenderables, SingleTile) { GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // parent tile GetTileDataAction{ { 1, { 1, 1, 1 } }, Found }, // found ideal tile - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 1, 1 }, *tile_1_1_1_1 }, // render found tile }), log); @@ -179,17 +174,17 @@ TEST(UpdateRenderables, SingleTile) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 1 } }, Found }, // missing ideal tile - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 2 } }, NotFound }, // four child tiles GetTileDataAction{ { 2, { 2, 0, 3 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 2 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 3 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // parent tile CreateTileDataAction{ { 0, { 0, 0, 0 } } }, // load parent tile - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 1, { 1, 1, 1 } }, Found }, // found ideal tile - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 1, 1 }, *tile_1_1_1_1 }, // render found tile }), log); @@ -202,11 +197,11 @@ TEST(UpdateRenderables, SingleTile) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 1 } }, Found }, // newly added tile - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 0, 1 }, *tile_1_1_0_1 }, // render ideal tile GetTileDataAction{ { 1, { 1, 1, 1 } }, Found }, // ideal tile - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 1, 1 }, *tile_1_1_1_1 }, // render found tile }), log); @@ -221,21 +216,21 @@ TEST(UpdateRenderables, SingleTile) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // found tile, not ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // four child tiles GetTileDataAction{ { 2, { 2, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // // optional parent tile was already created before, but is not renderable GetTileDataAction{ { 1, { 1, 0, 1 } }, Found }, // ideal tile - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 0, 1 }, *tile_1_1_0_1 }, // render ideal tile GetTileDataAction{ { 1, { 1, 1, 1 } }, Found }, // ideal tile - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 1, 1 }, *tile_1_1_1_1 }, // render ideal tile }), log); @@ -247,15 +242,15 @@ TEST(UpdateRenderables, SingleTile) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // found tile, now ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 0, 0 }, *tile_1_1_0_0 }, // GetTileDataAction{ { 1, { 1, 0, 1 } }, Found }, // ideal tile - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 0, 1 }, *tile_1_1_0_1 }, // GetTileDataAction{ { 1, { 1, 1, 1 } }, Found }, // ideal tile - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 1, 1 }, *tile_1_1_1_1 }, // }), log); @@ -281,24 +276,24 @@ TEST(UpdateRenderables, UseParentTile) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 1 } }, NotFound }, // missing ideal tile CreateTileDataAction{ { 1, { 1, 0, 1 } } }, // - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 2 } }, NotFound }, // child tile GetTileDataAction{ { 2, { 2, 0, 3 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 2 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 3 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent found! - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // render parent GetTileDataAction{ { 1, { 1, 1, 0 } }, NotFound }, // missing ideal tile CreateTileDataAction{ { 1, { 1, 1, 0 } } }, // - RetainTileDataAction{ { 1, { 1, 1, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 2, 0 } }, NotFound }, // child tile GetTileDataAction{ { 2, { 2, 2, 1 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 3, 0 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 3, 1 } }, NotFound }, // ... GetTileDataAction{ { 1, { 1, 1, 1 } }, NotFound }, // missing tile CreateTileDataAction{ { 1, { 1, 1, 1 } } }, // - RetainTileDataAction{ { 1, { 1, 1, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 1 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 2, 2 } }, NotFound }, // child tile GetTileDataAction{ { 2, { 2, 2, 3 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 3, 2 } }, NotFound }, // ... @@ -324,7 +319,7 @@ TEST(UpdateRenderables, DontUseWrongParentTile) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // missing ideal tile CreateTileDataAction{ { 2, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // child tile GetTileDataAction{ { 3, { 3, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 1, 0 } }, NotFound }, // ... @@ -341,14 +336,14 @@ TEST(UpdateRenderables, DontUseWrongParentTile) { source.idealTiles, source.zoomRange, 2); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // non-ready ideal tile - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // child tile GetTileDataAction{ { 3, { 3, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // parent tile, missing CreateTileDataAction{ { 1, { 1, 0, 0 } } }, // find optional parent - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // parent tile, missing }), log); @@ -360,25 +355,25 @@ TEST(UpdateRenderables, DontUseWrongParentTile) { source.idealTiles, source.zoomRange, 2); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // non-ready ideal tile - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // // this tile was added by the previous invocation of updateRenderables GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // child tile GetTileDataAction{ { 3, { 3, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // parent tile not ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // missing parent tile GetTileDataAction{ { 2, { 2, 2, 0 } }, NotFound }, // missing ideal tile CreateTileDataAction{ { 2, { 2, 2, 0 } } }, // - RetainTileDataAction{ { 2, { 2, 2, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 2, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 3, 4, 0 } }, NotFound }, // child tile GetTileDataAction{ { 3, { 3, 4, 1 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 5, 0 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 5, 1 } }, NotFound }, // ... GetTileDataAction{ { 1, { 1, 1, 0 } }, Found }, // found parent tile - RetainTileDataAction{ { 1, { 1, 1, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 1, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 1, 1, 0 }, *tile_1_1_1_0 }, // render parent tile }), log); @@ -405,13 +400,13 @@ TEST(UpdateRenderables, UseParentTileWhenChildNotReady) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 1 } }, Found }, // found, but not ready - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 2 } }, NotFound }, // child tile GetTileDataAction{ { 2, { 2, 0, 3 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 2 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 3 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile, ready - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // render parent tile }), log); @@ -423,7 +418,7 @@ TEST(UpdateRenderables, UseParentTileWhenChildNotReady) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 1 } }, Found }, // found and ready - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 0, 1 }, *tile_1_1_0_1 }, // render ideal tile }), log); @@ -451,17 +446,17 @@ TEST(UpdateRenderables, UseOverlappingParentTile) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // ideal tile not found CreateTileDataAction{ { 1, { 1, 0, 0 } } }, // - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // child tile GetTileDataAction{ { 2, { 2, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile found - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // GetTileDataAction{ { 1, { 1, 0, 1 } }, Found }, // ideal tile found - RetainTileDataAction{ { 1, { 1, 0, 1 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 1 } }, Resource::Necessity::Required }, // RenderTileAction{ { 1, 0, 1 }, *tile_1_1_0_1 }, // }), log); @@ -487,13 +482,13 @@ TEST(UpdateRenderables, UseChildTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // ideal tile, missing CreateTileDataAction{ { 0, { 0, 0, 0 } } }, // - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Required }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // child tile found - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 1, 0, 0 }, *tile_1_1_0_0 }, // render child tile GetTileDataAction{ { 1, { 1, 0, 1 } }, NotFound }, // child tile not found GetTileDataAction{ { 1, { 1, 1, 0 } }, Found }, // child tile found - RetainTileDataAction{ { 1, { 1, 1, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 1, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 1, 1, 0 }, *tile_1_1_1_0 }, // render child tile GetTileDataAction{ { 1, { 1, 1, 1 } }, NotFound }, // child tile not found // no parent tile of 0 to consider @@ -521,15 +516,15 @@ TEST(UpdateRenderables, PreferChildTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // ideal tile, not found CreateTileDataAction{ { 1, { 1, 0, 0 } } }, // - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // child tile, found - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, NotFound }, // child tile, not found GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile, found - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // }), log); @@ -544,17 +539,17 @@ TEST(UpdateRenderables, PreferChildTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // ideal tile, not ready // ideal tile was added in previous invocation, but is not yet ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // child tile, found - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, Found }, // ... - RetainTileDataAction{ { 2, { 2, 0, 1 } }, Optional }, // ... + RetainTileDataAction{ { 2, { 2, 0, 1 } }, Resource::Necessity::Optional }, // ... RenderTileAction{ { 2, 0, 1 }, *tile_2_2_0_1 }, // GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // child tile, not found GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile, found - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // }), log); @@ -567,19 +562,19 @@ TEST(UpdateRenderables, PreferChildTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // ideal tile, not ready // ideal tile was added in first invocation, but is not yet ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // child tile, found - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, Found }, // ... - RetainTileDataAction{ { 2, { 2, 0, 1 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 1 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 1 }, *tile_2_2_0_1 }, // GetTileDataAction{ { 2, { 2, 1, 0 } }, Found }, // ... - RetainTileDataAction{ { 2, { 2, 1, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 1, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 1, 0 }, *tile_2_2_1_0 }, // GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // child tile, not found GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile, found - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // }), log); @@ -593,18 +588,18 @@ TEST(UpdateRenderables, PreferChildTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // ideal tile, not ready // ideal tile was added in first invocation, but is not yet ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // child tile, found - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, Found }, // ... - RetainTileDataAction{ { 2, { 2, 0, 1 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 1 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 1 }, *tile_2_2_0_1 }, // GetTileDataAction{ { 2, { 2, 1, 0 } }, Found }, // ... - RetainTileDataAction{ { 2, { 2, 1, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 1, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 1, 0 }, *tile_2_2_1_0 }, // GetTileDataAction{ { 2, { 2, 1, 1 } }, Found }, // ... - RetainTileDataAction{ { 2, { 2, 1, 1 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 1, 1 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 1, 1 }, *tile_2_2_1_1 }, // }), log); @@ -631,15 +626,15 @@ TEST(UpdateRenderables, UseParentAndChildTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // ideal tile, missing CreateTileDataAction{ { 1, { 1, 0, 0 } } }, // - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // child tile - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // }), log); @@ -651,13 +646,13 @@ TEST(UpdateRenderables, UseParentAndChildTiles) { source.idealTiles, source.zoomRange, 1); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // parent tile - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // }), log); @@ -682,7 +677,7 @@ TEST(UpdateRenderables, DontUseTilesLowerThanMinzoom) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // ideal tile, missing CreateTileDataAction{ { 2, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // GetTileDataAction{ { 3, { 3, 0, 1 } }, NotFound }, // GetTileDataAction{ { 3, { 3, 1, 0 } }, NotFound }, // @@ -712,7 +707,7 @@ TEST(UpdateRenderables, UseOverzoomedTileAfterMaxzoom) { ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // ideal tile, missing CreateTileDataAction{ { 2, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 2, 0, 0 } }, NotFound }, // overzoomed tile, not children! GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // @@ -727,11 +722,11 @@ TEST(UpdateRenderables, UseOverzoomedTileAfterMaxzoom) { EXPECT_EQ( ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // ideal tile, missing - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 2, 0, 0 } }, NotFound }, // overzoomed tile, not children! GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // CreateTileDataAction{ { 1, { 1, 0, 0 } } }, // - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // }), log); @@ -745,10 +740,10 @@ TEST(UpdateRenderables, UseOverzoomedTileAfterMaxzoom) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 3, { 2, 0, 0 } }, NotFound }, // ideal tile, missing CreateTileDataAction{ { 3, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 3, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 3, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 4, { 2, 0, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // }), log); @@ -761,7 +756,7 @@ TEST(UpdateRenderables, UseOverzoomedTileAfterMaxzoom) { source.idealTiles, source.zoomRange, 3); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 3, { 2, 0, 0 } }, Found }, // - RetainTileDataAction{ { 3, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 3, { 2, 0, 0 } }, Resource::Necessity::Required }, // RenderTileAction{ { 2, 0, 0 }, *tile_3_2_0_0 }, // }), log); @@ -772,7 +767,7 @@ TEST(UpdateRenderables, UseOverzoomedTileAfterMaxzoom) { source.idealTiles, source.zoomRange, 2); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // }), log); @@ -788,9 +783,9 @@ TEST(UpdateRenderables, UseOverzoomedTileAfterMaxzoom) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // CreateTileDataAction{ { 2, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 2, 0, 0 } }, Found }, // use overzoomed tile! - RetainTileDataAction{ { 3, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 3, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_3_2_0_0 }, // }), log); @@ -814,7 +809,7 @@ TEST(UpdateRenderables, AscendToNonOverzoomedTiles) { source.idealTiles, source.zoomRange, 3); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 3, { 2, 0, 0 } }, Found }, // - RetainTileDataAction{ { 3, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 3, { 2, 0, 0 } }, Resource::Necessity::Required }, // RenderTileAction{ { 2, 0, 0 }, *tile_3_2_0_0 }, // }), log); @@ -830,10 +825,10 @@ TEST(UpdateRenderables, AscendToNonOverzoomedTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 3, { 2, 0, 0 } }, NotFound }, // CreateTileDataAction{ { 3, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 3, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 3, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 4, { 2, 0, 0 } }, NotFound }, // prefer using a child first GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 2, 0, 0 }, *tile_2_2_0_0 }, // }), log); @@ -848,11 +843,11 @@ TEST(UpdateRenderables, AscendToNonOverzoomedTiles) { source.idealTiles, source.zoomRange, 3); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 3, { 2, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 3, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 3, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 4, { 2, 0, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 1, 0, 0 }, *tile_1_1_0_0 }, // }), log); @@ -864,13 +859,13 @@ TEST(UpdateRenderables, AscendToNonOverzoomedTiles) { source.idealTiles, source.zoomRange, 3); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 3, { 2, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 3, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 3, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 4, { 2, 0, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // CreateTileDataAction{ { 2, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 1, 0, 0 }, *tile_1_1_0_0 }, // }), log); @@ -892,7 +887,7 @@ TEST(UpdateRenderables, DoNotAscendMultipleTimesIfNotFound) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 8, { 8, 0, 0 } }, NotFound }, // ideal tile CreateTileDataAction{ { 8, { 8, 0, 0 } } }, // - RetainTileDataAction{ { 8, { 8, 0, 0 } }, Required }, // + RetainTileDataAction{ { 8, { 8, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 9, { 9, 0, 0 } }, NotFound }, // child tile GetTileDataAction{ { 9, { 9, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 9, { 9, 1, 0 } }, NotFound }, // ... @@ -908,7 +903,7 @@ TEST(UpdateRenderables, DoNotAscendMultipleTimesIfNotFound) { GetTileDataAction{ { 8, { 8, 1, 0 } }, NotFound }, // ideal tile CreateTileDataAction{ { 8, { 8, 1, 0 } } }, // - RetainTileDataAction{ { 8, { 8, 1, 0 } }, Required }, // + RetainTileDataAction{ { 8, { 8, 1, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 9, { 9, 2, 0 } }, NotFound }, // child tile GetTileDataAction{ { 9, { 9, 2, 1 } }, NotFound }, // ... GetTileDataAction{ { 9, { 9, 3, 0 } }, NotFound }, // ... @@ -926,7 +921,7 @@ TEST(UpdateRenderables, DoNotAscendMultipleTimesIfNotFound) { source.idealTiles, source.zoomRange, 8); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 8, { 8, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 8, { 8, 0, 0 } }, Required }, // + RetainTileDataAction{ { 8, { 8, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 9, { 9, 0, 0 } }, NotFound }, // child tile GetTileDataAction{ { 9, { 9, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 9, { 9, 1, 0 } }, NotFound }, // ... @@ -935,11 +930,11 @@ TEST(UpdateRenderables, DoNotAscendMultipleTimesIfNotFound) { GetTileDataAction{ { 6, { 6, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 5, { 5, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 4, { 4, 0, 0 } }, Found }, // stops ascent - RetainTileDataAction{ { 4, { 4, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 4, { 4, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 4, 0, 0 }, *tile_4_0_0_0 }, // GetTileDataAction{ { 8, { 8, 1, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 8, { 8, 1, 0 } }, Required }, // + RetainTileDataAction{ { 8, { 8, 1, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 9, { 9, 2, 0 } }, NotFound }, // child tile GetTileDataAction{ { 9, { 9, 2, 1 } }, NotFound }, // ... GetTileDataAction{ { 9, { 9, 3, 0 } }, NotFound }, // ... @@ -966,13 +961,13 @@ TEST(UpdateRenderables, DontRetainUnusedNonIdealTiles) { source.idealTiles, source.zoomRange, 2); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 2, { 2, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Required }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // GetTileDataAction{ { 3, { 3, 0, 1 } }, NotFound }, // GetTileDataAction{ { 3, { 3, 1, 0 } }, NotFound }, // GetTileDataAction{ { 3, { 3, 1, 1 } }, NotFound }, // GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // parent tile, not ready - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // }), log); @@ -999,28 +994,28 @@ TEST(UpdateRenderables, WrappedTiles) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 1, { 1, 1, 0 } }, NotFound }, // ideal tile 1/-1/0 CreateTileDataAction{ { 1, { 1, 1, 0 } } }, // - RetainTileDataAction{ { 1, { 1, 1, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 2, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 2, 1 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 3, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 3, 1 } }, NotFound }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, -1, 0 }, *tile_0_0_0_0 }, // GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // ideal tile 1/0/0 CreateTileDataAction{ { 1, { 1, 0, 0 } } }, // - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 0, 0 }, *tile_0_0_0_0 }, // GetTileDataAction{ { 1, { 1, 1, 0 } }, Found }, // ideal tile 1/1/0 - RetainTileDataAction{ { 1, { 1, 1, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 1, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 2, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 2, 1 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 3, 0 } }, NotFound }, // @@ -1028,13 +1023,13 @@ TEST(UpdateRenderables, WrappedTiles) { // do not ascent; 0/0/0 has been rendered already for 1/0/0 GetTileDataAction{ { 1, { 1, 0, 0 } }, Found }, // ideal tile 1/2/0 - RetainTileDataAction{ { 1, { 1, 0, 0 } }, Required }, // + RetainTileDataAction{ { 1, { 1, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 0, 1 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 0 } }, NotFound }, // GetTileDataAction{ { 2, { 2, 1, 1 } }, NotFound }, // GetTileDataAction{ { 0, { 0, 0, 0 } }, Found }, // - RetainTileDataAction{ { 0, { 0, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 0, { 0, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 0, 1, 0 }, *tile_0_0_0_0 }, // }), log); @@ -1055,7 +1050,7 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, NotFound }, // ideal tile, not found CreateTileDataAction{ { 6, { 6, 0, 0 } } }, // - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... @@ -1075,7 +1070,7 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { source.idealTiles, source.zoomRange, 6); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... @@ -1096,14 +1091,14 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { source.idealTiles, source.zoomRange, 6); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 5, { 5, 0, 0 } }, NotFound }, // ascent CreateTileDataAction{ { 5, { 5, 0, 0 } } }, // - RetainTileDataAction{ { 5, { 5, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 5, { 5, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 4, { 4, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // ... @@ -1118,13 +1113,13 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { source.idealTiles, source.zoomRange, 6); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 5, { 5, 0, 0 } }, Found }, // ascent - RetainTileDataAction{ { 5, { 5, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 5, { 5, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 4, { 4, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // ... @@ -1140,16 +1135,16 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { source.idealTiles, source.zoomRange, 6); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 5, { 5, 0, 0 } }, Found }, // ascent - RetainTileDataAction{ { 5, { 5, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 5, { 5, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 4, { 4, 0, 0 } }, NotFound }, // ... CreateTileDataAction{ { 4, { 4, 0, 0 } } }, // - RetainTileDataAction{ { 4, { 4, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 4, { 4, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // ... @@ -1164,18 +1159,18 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { source.idealTiles, source.zoomRange, 6); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 5, { 5, 0, 0 } }, Found }, // ascent - RetainTileDataAction{ { 5, { 5, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 5, { 5, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 4, { 4, 0, 0 } }, Found }, // ... - RetainTileDataAction{ { 4, { 4, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 4, { 4, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, NotFound }, // ... CreateTileDataAction{ { 3, { 3, 0, 0 } } }, // - RetainTileDataAction{ { 3, { 3, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 3, { 3, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // ... @@ -1189,20 +1184,20 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { source.idealTiles, source.zoomRange, 6); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 5, { 5, 0, 0 } }, Found }, // ascent - RetainTileDataAction{ { 5, { 5, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 5, { 5, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 4, { 4, 0, 0 } }, Found }, // ... - RetainTileDataAction{ { 4, { 4, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 4, { 4, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, Found }, // ... - RetainTileDataAction{ { 3, { 3, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 3, { 3, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 2, { 2, 0, 0 } }, NotFound }, // ... CreateTileDataAction{ { 2, { 2, 0, 0 } } }, // - RetainTileDataAction{ { 2, { 2, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 2, { 2, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 1, { 1, 0, 0 } }, NotFound }, // ... GetTileDataAction{ { 0, { 0, 0, 0 } }, NotFound }, // ... }), @@ -1216,17 +1211,17 @@ TEST(UpdateRenderables, RepeatedRenderWithMissingOptionals) { source.idealTiles, source.zoomRange, 6); EXPECT_EQ(ActionLog({ GetTileDataAction{ { 6, { 6, 0, 0 } }, Found }, // ideal tile, not ready - RetainTileDataAction{ { 6, { 6, 0, 0 } }, Required }, // + RetainTileDataAction{ { 6, { 6, 0, 0 } }, Resource::Necessity::Required }, // GetTileDataAction{ { 7, { 7, 0, 0 } }, NotFound }, // children GetTileDataAction{ { 7, { 7, 0, 1 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 0 } }, NotFound }, // ... GetTileDataAction{ { 7, { 7, 1, 1 } }, NotFound }, // ... GetTileDataAction{ { 5, { 5, 0, 0 } }, Found }, // ascent - RetainTileDataAction{ { 5, { 5, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 5, { 5, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 4, { 4, 0, 0 } }, Found }, // ... - RetainTileDataAction{ { 4, { 4, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 4, { 4, 0, 0 } }, Resource::Necessity::Optional }, // GetTileDataAction{ { 3, { 3, 0, 0 } }, Found }, // ... - RetainTileDataAction{ { 3, { 3, 0, 0 } }, Optional }, // + RetainTileDataAction{ { 3, { 3, 0, 0 } }, Resource::Necessity::Optional }, // RenderTileAction{ { 3, 0, 0 }, *tile_3_3_0_0 }, // }), log); |