diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-02-15 21:55:47 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-03-05 06:58:50 +0100 |
commit | 6634d3b3e9c6ac8aac37a344fc2de4f543f52170 (patch) | |
tree | 87a7432d31f98d89db928159ce179c32e526457f /test/TileCacheTests.cpp | |
parent | 43161ba382a7c56fe589e4a1621798134f54d718 (diff) |
TileCache: key almost everything on TileDesc instead of string names.
Saves lots of string construction and storage, simplifies lots of code.
Store the more exotic font-caching bits etc. in a separate store: we
should also pre-render these really and share them.
Change-Id: Icaeff8fd72f52d7215c06a687b1e39cfb7631503
Diffstat (limited to 'test/TileCacheTests.cpp')
-rw-r--r-- | test/TileCacheTests.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp index c02989dee..d6577f50a 100644 --- a/test/TileCacheTests.cpp +++ b/test/TileCacheTests.cpp @@ -57,6 +57,7 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture CPPUNIT_TEST_SUITE(TileCacheTests); + CPPUNIT_TEST(testDesc); CPPUNIT_TEST(testSimple); CPPUNIT_TEST(testSimpleCombine); CPPUNIT_TEST(testCancelTiles); @@ -91,6 +92,7 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture CPPUNIT_TEST_SUITE_END(); + void testDesc(); void testSimple(); void testSimpleCombine(); void testCancelTiles(); @@ -173,6 +175,15 @@ public: } }; +void TileCacheTests::testDesc() +{ + TileCacheDesc descA = TileDesc(0, 256, 256, 0, 0, 3200, 3200, /* ignored in cache */ 0, 1234, 1, true); + TileCacheDesc descB = TileDesc(0, 256, 256, 0, 0, 3200, 3200, /* ignored in cache */ 1, 1235, 2, false); + + CPPUNIT_ASSERT_MESSAGE("versions do match", descA.getVersion() != descB.getVersion()); + CPPUNIT_ASSERT_MESSAGE("Compare includes fields it should not", descA == descB); +} + void TileCacheTests::testSimple() { if (isStandalone()) |