diff options
Diffstat (limited to 'tests/pipelinetest.cpp')
-rw-r--r-- | tests/pipelinetest.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/pipelinetest.cpp b/tests/pipelinetest.cpp index c6ee9ab..fc23cc9 100644 --- a/tests/pipelinetest.cpp +++ b/tests/pipelinetest.cpp | |||
@@ -349,11 +349,11 @@ private slots: | |||
349 | { | 349 | { |
350 | flatbuffers::FlatBufferBuilder entityFbb; | 350 | flatbuffers::FlatBufferBuilder entityFbb; |
351 | 351 | ||
352 | TestProcessor testProcessor; | 352 | auto testProcessor = new TestProcessor; |
353 | 353 | ||
354 | Sink::Pipeline pipeline("org.kde.pipelinetest.instance1"); | 354 | Sink::Pipeline pipeline("org.kde.pipelinetest.instance1"); |
355 | pipeline.setResourceType("test"); | 355 | pipeline.setResourceType("test"); |
356 | pipeline.setPreprocessors("event", QVector<Sink::Preprocessor *>() << &testProcessor); | 356 | pipeline.setPreprocessors("event", QVector<Sink::Preprocessor *>() << testProcessor); |
357 | pipeline.startTransaction(); | 357 | pipeline.startTransaction(); |
358 | // pipeline.setAdaptorFactory("event", QSharedPointer<TestEventAdaptorFactory>::create()); | 358 | // pipeline.setAdaptorFactory("event", QSharedPointer<TestEventAdaptorFactory>::create()); |
359 | 359 | ||
@@ -361,10 +361,10 @@ private slots: | |||
361 | { | 361 | { |
362 | auto command = createEntityCommand(createEvent(entityFbb)); | 362 | auto command = createEntityCommand(createEvent(entityFbb)); |
363 | pipeline.newEntity(command.constData(), command.size()); | 363 | pipeline.newEntity(command.constData(), command.size()); |
364 | QCOMPARE(testProcessor.newUids.size(), 1); | 364 | QCOMPARE(testProcessor->newUids.size(), 1); |
365 | QCOMPARE(testProcessor.newRevisions.size(), 1); | 365 | QCOMPARE(testProcessor->newRevisions.size(), 1); |
366 | // Key doesn't contain revision and is just the uid | 366 | // Key doesn't contain revision and is just the uid |
367 | QCOMPARE(testProcessor.newUids.at(0), Sink::Storage::uidFromKey(testProcessor.newUids.at(0))); | 367 | QCOMPARE(testProcessor->newUids.at(0), Sink::Storage::uidFromKey(testProcessor->newUids.at(0))); |
368 | } | 368 | } |
369 | pipeline.commit(); | 369 | pipeline.commit(); |
370 | entityFbb.Clear(); | 370 | entityFbb.Clear(); |
@@ -375,10 +375,10 @@ private slots: | |||
375 | { | 375 | { |
376 | auto modifyCommand = modifyEntityCommand(createEvent(entityFbb, "summary2"), uid, 1); | 376 | auto modifyCommand = modifyEntityCommand(createEvent(entityFbb, "summary2"), uid, 1); |
377 | pipeline.modifiedEntity(modifyCommand.constData(), modifyCommand.size()); | 377 | pipeline.modifiedEntity(modifyCommand.constData(), modifyCommand.size()); |
378 | QCOMPARE(testProcessor.modifiedUids.size(), 1); | 378 | QCOMPARE(testProcessor->modifiedUids.size(), 1); |
379 | QCOMPARE(testProcessor.modifiedRevisions.size(), 1); | 379 | QCOMPARE(testProcessor->modifiedRevisions.size(), 1); |
380 | // Key doesn't contain revision and is just the uid | 380 | // Key doesn't contain revision and is just the uid |
381 | QCOMPARE(testProcessor.modifiedUids.at(0), Sink::Storage::uidFromKey(testProcessor.modifiedUids.at(0))); | 381 | QCOMPARE(testProcessor->modifiedUids.at(0), Sink::Storage::uidFromKey(testProcessor->modifiedUids.at(0))); |
382 | } | 382 | } |
383 | pipeline.commit(); | 383 | pipeline.commit(); |
384 | entityFbb.Clear(); | 384 | entityFbb.Clear(); |
@@ -386,12 +386,12 @@ private slots: | |||
386 | { | 386 | { |
387 | auto deleteCommand = deleteEntityCommand(uid, 1); | 387 | auto deleteCommand = deleteEntityCommand(uid, 1); |
388 | pipeline.deletedEntity(deleteCommand.constData(), deleteCommand.size()); | 388 | pipeline.deletedEntity(deleteCommand.constData(), deleteCommand.size()); |
389 | QCOMPARE(testProcessor.deletedUids.size(), 1); | 389 | QCOMPARE(testProcessor->deletedUids.size(), 1); |
390 | QCOMPARE(testProcessor.deletedUids.size(), 1); | 390 | QCOMPARE(testProcessor->deletedUids.size(), 1); |
391 | QCOMPARE(testProcessor.deletedSummaries.size(), 1); | 391 | QCOMPARE(testProcessor->deletedSummaries.size(), 1); |
392 | // Key doesn't contain revision and is just the uid | 392 | // Key doesn't contain revision and is just the uid |
393 | QCOMPARE(testProcessor.deletedUids.at(0), Sink::Storage::uidFromKey(testProcessor.deletedUids.at(0))); | 393 | QCOMPARE(testProcessor->deletedUids.at(0), Sink::Storage::uidFromKey(testProcessor->deletedUids.at(0))); |
394 | QCOMPARE(testProcessor.deletedSummaries.at(0), QByteArray("summary2")); | 394 | QCOMPARE(testProcessor->deletedSummaries.at(0), QByteArray("summary2")); |
395 | } | 395 | } |
396 | } | 396 | } |
397 | }; | 397 | }; |