diff --git a/test/TileQueueTests.cpp b/test/TileQueueTests.cpp index 4128df3e9..2bf8e7a73 100644 --- a/test/TileQueueTests.cpp +++ b/test/TileQueueTests.cpp @@ -50,6 +50,8 @@ class TileQueueTests : public CPPUNIT_NS::TestFixture CPPUNIT_TEST(testSenderQueueTileDeduplication); CPPUNIT_TEST(testInvalidateViewCursorDeduplication); CPPUNIT_TEST(testCallbackInvalidation); + CPPUNIT_TEST(testCallbackIndicatorValue); + CPPUNIT_TEST(testCallbackPageSize); CPPUNIT_TEST_SUITE_END(); @@ -62,6 +64,8 @@ class TileQueueTests : public CPPUNIT_NS::TestFixture void testSenderQueueTileDeduplication(); void testInvalidateViewCursorDeduplication(); void testCallbackInvalidation(); + void testCallbackIndicatorValue(); + void testCallbackPageSize(); }; void TileQueueTests::testTileQueuePriority() @@ -444,6 +448,30 @@ void TileQueueTests::testCallbackInvalidation() CPPUNIT_ASSERT_EQUAL(std::string("callback all 0 EMPTY, 0"), payloadAsString(queue.get())); } +void TileQueueTests::testCallbackIndicatorValue() +{ + TileQueue queue; + + // join tiles + queue.put("callback all 10 25"); + queue.put("callback all 10 50"); + + CPPUNIT_ASSERT_EQUAL(1, static_cast(queue._queue.size())); + CPPUNIT_ASSERT_EQUAL(std::string("callback all 10 50"), payloadAsString(queue.get())); +} + +void TileQueueTests::testCallbackPageSize() +{ + TileQueue queue; + + // join tiles + queue.put("callback all 13 12474, 188626"); + queue.put("callback all 13 12474, 205748"); + + CPPUNIT_ASSERT_EQUAL(1, static_cast(queue._queue.size())); + CPPUNIT_ASSERT_EQUAL(std::string("callback all 13 12474, 205748"), payloadAsString(queue.get())); +} + CPPUNIT_TEST_SUITE_REGISTRATION(TileQueueTests); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */