summaryrefslogtreecommitdiff
path: root/test/TileQueueTests.cpp
blob: 1804ee8bffe2e9f22ff23cf1475448fc45733a29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <config.h>

#include <cppunit/extensions/HelperMacros.h>

#include <Common.hpp>
#include <Protocol.hpp>
#include <Message.hpp>
#include <MessageQueue.hpp>
#include <SenderQueue.hpp>
#include <Util.hpp>

namespace CPPUNIT_NS
{
template<>
struct assertion_traits<std::vector<char>>
{
    static bool equal(const std::vector<char>& x, const std::vector<char>& y)
    {
        return x == y;
    }

    static std::string toString(const std::vector<char>& x)
    {
        const std::string text = '"' + (!x.empty() ? std::string(x.data(), x.size()) : "<empty>") + '"';
        return text;
    }
};
}

/// TileQueue unit-tests.
class TileQueueTests : public CPPUNIT_NS::TestFixture
{
    CPPUNIT_TEST_SUITE(TileQueueTests);

    CPPUNIT_TEST(testTileQueuePriority);
    CPPUNIT_TEST(testTileCombinedRendering);
    CPPUNIT_TEST(testTileRecombining);
    CPPUNIT_TEST(testViewOrder);
    CPPUNIT_TEST(testPreviewsDeprioritization);
    CPPUNIT_TEST(testSenderQueue);
    CPPUNIT_TEST(testSenderQueueTileDeduplication);
    CPPUNIT_TEST(testInvalidateViewCursorDeduplication);
    CPPUNIT_TEST(testCallbackInvalidation);
    CPPUNIT_TEST(testCallbackIndicatorValue);
    CPPUNIT_TEST(testCallbackPageSize);

    CPPUNIT_TEST_SUITE_END();

    void testTileQueuePriority();
    void testTileCombinedRendering();
    void testTileRecombining();
    void testViewOrder();
    void testPreviewsDeprioritization();
    void testSenderQueue();
    void testSenderQueueTileDeduplication();
    void testInvalidateViewCursorDeduplication();
    void testCallbackInvalidation();
    void testCallbackIndicatorValue();
    void testCallbackPageSize();
};

void TileQueueTests::testTileQueuePriority()
{
    const std::string reqHigh = "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=0 tilewidth=3840 tileheight=3840 oldwid=0 wid=0";
    const std::string resHigh = "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=0 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1";
    const TileQueue::Payload payloadHigh(resHigh.data(), resHigh.data() + resHigh.size());
    const std::string reqLow = "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=253440 tilewidth=3840 tileheight=3840 oldwid=0 wid=0";
    const std::string resLow = "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=253440 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1";
    const TileQueue::Payload payloadLow(resLow.data(), resLow.data() + resLow.size());

    TileQueue queue;

    // Request the tiles.
    queue.put(reqLow);
    queue.put(reqHigh);

    // Original order.
    CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());
    CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());

    // Request the tiles.
    queue.put(reqLow);
    queue.put(reqHigh);
    queue.put(reqHigh);
    queue.put(reqLow);

    // Set cursor above reqHigh.
    queue.updateCursorPosition(0, 0, 0, 0, 10, 100);

    // Prioritized order.
    CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());
    CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());

    // Repeat with cursor position set.
    queue.put(reqLow);
    queue.put(reqHigh);
    CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());
    CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());

    // Repeat by changing cursor position.
    queue.put(reqLow);
    queue.put(reqHigh);
    queue.updateCursorPosition(0, 0, 0, 253450, 10, 100);
    CPPUNIT_ASSERT_EQUAL(payloadLow, queue.get());
    CPPUNIT_ASSERT_EQUAL(payloadHigh, queue.get());
}

void TileQueueTests::testTileCombinedRendering()
{
    const std::string req1 = "tile nviewid=0 nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=0 tilewidth=3840 tileheight=3840";
    const std::string req2 = "tile nviewid=0 part=0 width=256 height=256 tileposx=3840 tileposy=0 tilewidth=3840 tileheight=3840";
    const std::string req3 = "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=3840 tilewidth=3840 tileheight=3840";

    const std::string resHor = "tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840 tileposy=0,0 imgsize=0,0 tilewidth=3840 tileheight=3840 ver=-1,-1 oldwid=0,0 wid=0,0";
    const TileQueue::Payload payloadHor(resHor.data(), resHor.data() + resHor.size());
    const std::string resVer = "tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,0 tileposy=0,3840 imgsize=0,0 tilewidth=3840 tileheight=3840 ver=-1,-1 oldwid=0,0 wid=0,0";
    const TileQueue::Payload payloadVer(resVer.data(), resVer.data() + resVer.size());
    const std::string resFull = "tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840,0 tileposy=0,0,3840 imgsize=0,0,0 tilewidth=3840 tileheight=3840 ver=-1,-1,-1 oldwid=0,0,0 wid=0,0,0";
    const TileQueue::Payload payloadFull(resFull.data(), resFull.data() + resFull.size());

    TileQueue queue;

    // Horizontal.
    queue.put(req1);
    queue.put(req2);
    CPPUNIT_ASSERT_EQUAL(payloadHor, queue.get());

    // Vertical.
    queue.put(req1);
    queue.put(req3);
    CPPUNIT_ASSERT_EQUAL(payloadVer, queue.get());

    // Vertical.
    queue.put(req1);
    queue.put(req2);
    queue.put(req3);
    CPPUNIT_ASSERT_EQUAL(payloadFull, queue.get());
}

namespace {

std::string payloadAsString(const MessageQueue::Payload& payload)
{
    return std::string(payload.data(), payload.size());
}

}

void TileQueueTests::testTileRecombining()
{
    TileQueue queue;

    queue.put("tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840,7680 tileposy=0,0,0 tilewidth=3840 tileheight=3840");
    queue.put("tilecombine nviewid=0 part=0 width=256 height=256 tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");

    // the tilecombine's get merged, resulting in 3 "tile" messages
    CPPUNIT_ASSERT_EQUAL(3, static_cast<int>(queue.getQueue().size()));

    // but when we later extract that, it is just one "tilecombine" message
    std::string message(payloadAsString(queue.get()));

    CPPUNIT_ASSERT_EQUAL(std::string("tilecombine nviewid=0 part=0 width=256 height=256 tileposx=7680,0,3840 tileposy=0,0,0 imgsize=0,0,0 tilewidth=3840 tileheight=3840 ver=-1,-1,-1 oldwid=0,0,0 wid=0,0,0"), message);

    // and nothing remains in the queue
    CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(queue.getQueue().size()));
}

void TileQueueTests::testViewOrder()
{
    TileQueue queue;

    // should result in the 3, 2, 1, 0 order of the views
    queue.updateCursorPosition(0, 0, 0, 0, 10, 100);
    queue.updateCursorPosition(2, 0, 0, 0, 10, 100);
    queue.updateCursorPosition(1, 0, 0, 7680, 10, 100);
    queue.updateCursorPosition(3, 0, 0, 0, 10, 100);
    queue.updateCursorPosition(2, 0, 0, 15360, 10, 100);
    queue.updateCursorPosition(3, 0, 0, 23040, 10, 100);

    const std::vector<std::string> tiles =
    {
        "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=0 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1",
        "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=7680 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1",
        "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=15360 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1",
        "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=23040 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1"
    };

    for (auto &tile : tiles)
        queue.put(tile);

    CPPUNIT_ASSERT_EQUAL(4, static_cast<int>(queue.getQueue().size()));

    // should result in the 3, 2, 1, 0 order of the tiles thanks to the cursor
    // positions
    for (size_t i = 0; i < tiles.size(); ++i)
    {
        CPPUNIT_ASSERT_EQUAL(tiles[3 - i], payloadAsString(queue.get()));
    }
}

void TileQueueTests::testPreviewsDeprioritization()
{
    TileQueue queue;

    // simple case - put previews to the queue and get everything back again
    const std::vector<std::string> previews =
    {
        "tile nviewid=0 part=0 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=-1 id=0",
        "tile nviewid=0 part=1 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=-1 id=1",
        "tile nviewid=0 part=2 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=-1 id=2",
        "tile nviewid=0 part=3 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=-1 id=3"
    };

    for (auto &preview : previews)
        queue.put(preview);

    for (size_t i = 0; i < previews.size(); ++i)
    {
        CPPUNIT_ASSERT_EQUAL(previews[i], payloadAsString(queue.get()));
    }

    // stays empty after all is done
    CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(queue.getQueue().size()));

    // re-ordering case - put previews and normal tiles to the queue and get
    // everything back again but this time the tiles have to interleave with
    // the previews
    const std::vector<std::string> tiles =
    {
        "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=0 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1",
        "tile nviewid=0 part=0 width=256 height=256 tileposx=0 tileposy=7680 tilewidth=3840 tileheight=3840 oldwid=0 wid=0 ver=-1"
    };

    for (auto &preview : previews)
        queue.put(preview);

    queue.put(tiles[0]);

    CPPUNIT_ASSERT_EQUAL(previews[0], payloadAsString(queue.get()));
    CPPUNIT_ASSERT_EQUAL(tiles[0], payloadAsString(queue.get()));
    CPPUNIT_ASSERT_EQUAL(previews[1], payloadAsString(queue.get()));

    queue.put(tiles[1]);

    CPPUNIT_ASSERT_EQUAL(previews[2], payloadAsString(queue.get()));
    CPPUNIT_ASSERT_EQUAL(tiles[1], payloadAsString(queue.get()));
    CPPUNIT_ASSERT_EQUAL(previews[3], payloadAsString(queue.get()));

    // stays empty after all is done
    CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(queue.getQueue().size()));

    // cursor positioning case - the cursor position should not prioritize the
    // previews
    queue.updateCursorPosition(0, 0, 0, 0, 10, 100);

    queue.put(tiles[1]);
    queue.put(previews[0]);

    CPPUNIT_ASSERT_EQUAL(tiles[1], payloadAsString(queue.get()));
    CPPUNIT_ASSERT_EQUAL(previews[0], payloadAsString(queue.get()));

    // stays empty after all is done
    CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(queue.getQueue().size()));
}

void TileQueueTests::testSenderQueue()
{
    SenderQueue<std::shared_ptr<Message>> queue;

    std::shared_ptr<Message> item;

    // Empty queue
    CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item));
    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size());

    const std::vector<std::string> messages =
    {
        "message 1",
        "message 2",
        "message 3"
    };

    for (const auto& msg : messages)
    {
        queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
    }

    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), queue.size());

    CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
    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(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(static_cast<size_t>(0), queue.size());
    CPPUNIT_ASSERT_EQUAL(messages[2], std::string(item->data().data(), item->data().size()));

    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size());
}

void TileQueueTests::testSenderQueueTileDeduplication()
{
    SenderQueue<std::shared_ptr<Message>> queue;

    std::shared_ptr<Message> item;

    // Empty queue
    CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item));
    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size());

    const std::vector<std::string> part_messages =
    {
        "tile: nviewid=0 part=0 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=0",
        "tile: nviewid=0 part=1 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=1",
        "tile: nviewid=0 part=2 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=-1"
    };

    for (const auto& msg : part_messages)
    {
        queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
    }

    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(static_cast<size_t>(0), queue.size());

    const std::vector<std::string> dup_messages =
    {
        "tile: nviewid=0 part=0 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=-1",
        "tile: nviewid=0 part=0 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=1",
        "tile: nviewid=0 part=0 width=180 height=135 tileposx=0 tileposy=0 tilewidth=15875 tileheight=11906 ver=1"
    };

    for (const auto& msg : dup_messages)
    {
        queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
    }

    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(static_cast<size_t>(0), queue.size());
}

void TileQueueTests::testInvalidateViewCursorDeduplication()
{
    SenderQueue<std::shared_ptr<Message>> queue;

    std::shared_ptr<Message> item;

    // Empty queue
    CPPUNIT_ASSERT_EQUAL(false, queue.dequeue(item));
    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size());

    const std::vector<std::string> view_messages =
    {
        "invalidateviewcursor: {    \"viewId\": \"1\",     \"rectangle\": \"3999, 1418, 0, 298\",     \"part\": \"0\" }",
        "invalidateviewcursor: {    \"viewId\": \"2\",     \"rectangle\": \"3999, 1418, 0, 298\",     \"part\": \"0\" }",
        "invalidateviewcursor: {    \"viewId\": \"3\",     \"rectangle\": \"3999, 1418, 0, 298\",     \"part\": \"0\" }",
    };

    for (const auto& msg : view_messages)
    {
        queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
    }

    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), queue.size());

    CPPUNIT_ASSERT_EQUAL(true, queue.dequeue(item));
    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(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(static_cast<size_t>(0), queue.size());
    CPPUNIT_ASSERT_EQUAL(view_messages[2], std::string(item->data().data(), item->data().size()));

    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), queue.size());

    const std::vector<std::string> dup_messages =
    {
        "invalidateviewcursor: {    \"viewId\": \"1\",     \"rectangle\": \"3999, 1418, 0, 298\",     \"part\": \"0\" }",
        "invalidateviewcursor: {    \"viewId\": \"1\",     \"rectangle\": \"1000, 1418, 0, 298\",     \"part\": \"0\" }",
        "invalidateviewcursor: {    \"viewId\": \"1\",     \"rectangle\": \"2000, 1418, 0, 298\",     \"part\": \"0\" }",
    };

    for (const auto& msg : dup_messages)
    {
        queue.enqueue(std::make_shared<Message>(msg, Message::Dir::Out));
    }

    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(static_cast<size_t>(0), queue.size());
}

void TileQueueTests::testCallbackInvalidation()
{
    TileQueue queue;

    // join tiles
    queue.put("callback all 0 284, 1418, 11105, 275, 0");
    queue.put("callback all 0 4299, 1418, 7090, 275, 0");

    CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(queue.getQueue().size()));

    CPPUNIT_ASSERT_EQUAL(std::string("callback all 0 284, 1418, 11105, 275, 0"), payloadAsString(queue.get()));

    // invalidate everything with EMPTY, but keep the different part intact
    queue.put("callback all 0 284, 1418, 11105, 275, 0");
    queue.put("callback all 0 4299, 1418, 7090, 275, 1");
    queue.put("callback all 0 4299, 10418, 7090, 275, 0");
    queue.put("callback all 0 4299, 20418, 7090, 275, 0");

    CPPUNIT_ASSERT_EQUAL(4, static_cast<int>(queue.getQueue().size()));

    queue.put("callback all 0 EMPTY, 0");

    CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(queue.getQueue().size()));
    CPPUNIT_ASSERT_EQUAL(std::string("callback all 0 4299, 1418, 7090, 275, 1"), payloadAsString(queue.get()));
    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<int>(queue.getQueue().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<int>(queue.getQueue().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: */