diff options
Diffstat (limited to 'test/TileQueueTests.cpp')
-rw-r--r-- | test/TileQueueTests.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/test/TileQueueTests.cpp b/test/TileQueueTests.cpp index 209c5ffa9..1804ee8bf 100644 --- a/test/TileQueueTests.cpp +++ b/test/TileQueueTests.cpp @@ -280,7 +280,7 @@ void TileQueueTests::testSenderQueue() // Empty queue CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); const std::vector<std::string> messages = { @@ -294,21 +294,21 @@ void TileQueueTests::testSenderQueue() queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out)); } - CPPUNIT_ASSERT_EQUAL(3UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), queue.size()); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(2UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), queue.size()); CPPUNIT_ASSERT_EQUAL(messages[0], std::string(item->data().data(), item->data().size())); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(1UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), queue.size()); CPPUNIT_ASSERT_EQUAL(messages[1], std::string(item->data().data(), item->data().size())); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); CPPUNIT_ASSERT_EQUAL(messages[2], std::string(item->data().data(), item->data().size())); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); } void TileQueueTests::testSenderQueueTileDeduplication() @@ -319,7 +319,7 @@ void TileQueueTests::testSenderQueueTileDeduplication() // Empty queue CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); const std::vector<std::string> part_messages = { @@ -333,12 +333,12 @@ void TileQueueTests::testSenderQueueTileDeduplication() queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out)); } - CPPUNIT_ASSERT_EQUAL(3UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), queue.size()); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); const std::vector<std::string> dup_messages = { @@ -352,13 +352,13 @@ void TileQueueTests::testSenderQueueTileDeduplication() queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out)); } - CPPUNIT_ASSERT_EQUAL(1UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), queue.size()); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); // The last one should persist. CPPUNIT_ASSERT_EQUAL(dup_messages[2], std::string(item->data().data(), item->data().size())); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); } void TileQueueTests::testInvalidateViewCursorDeduplication() @@ -369,7 +369,7 @@ void TileQueueTests::testInvalidateViewCursorDeduplication() // Empty queue CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); const std::vector<std::string> view_messages = { @@ -383,21 +383,21 @@ void TileQueueTests::testInvalidateViewCursorDeduplication() queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out)); } - CPPUNIT_ASSERT_EQUAL(3UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), queue.size()); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(2UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), queue.size()); CPPUNIT_ASSERT_EQUAL(view_messages[0], std::string(item->data().data(), item->data().size())); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(1UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), queue.size()); CPPUNIT_ASSERT_EQUAL(view_messages[1], std::string(item->data().data(), item->data().size())); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); CPPUNIT_ASSERT_EQUAL(view_messages[2], std::string(item->data().data(), item->data().size())); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); const std::vector<std::string> dup_messages = { @@ -411,13 +411,13 @@ void TileQueueTests::testInvalidateViewCursorDeduplication() queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out)); } - CPPUNIT_ASSERT_EQUAL(1UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), queue.size()); CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item)); // The last one should persist. CPPUNIT_ASSERT_EQUAL(dup_messages[2], std::string(item->data().data(), item->data().size())); - CPPUNIT_ASSERT_EQUAL(0UL, queue.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size()); } void TileQueueTests::testCallbackInvalidation() |