diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-06 16:19:51 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-10-10 10:40:01 +0200 |
commit | f689ad1021a7805f6f8b6a81f534b4cb9ca91f51 (patch) | |
tree | c18d746b775279f143c8d8052924bb4d83fbb91f /tests | |
parent | c3f6e72c2d46906a4699127b558ca248729ce577 (diff) | |
download | sink-f689ad1021a7805f6f8b6a81f534b4cb9ca91f51.tar.gz sink-f689ad1021a7805f6f8b6a81f534b4cb9ca91f51.zip |
Change replay
So far only includes modifications and additions,
removals are not yet stored as separate revisions.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dummyresourcetest.cpp | 4 | ||||
-rw-r--r-- | tests/genericfacadetest.cpp | 5 | ||||
-rw-r--r-- | tests/storagetest.cpp | 9 |
3 files changed, 14 insertions, 4 deletions
diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index a28e071..caf808a 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp | |||
@@ -2,10 +2,6 @@ | |||
2 | 2 | ||
3 | #include <QString> | 3 | #include <QString> |
4 | 4 | ||
5 | #include "event_generated.h" | ||
6 | #include "entity_generated.h" | ||
7 | #include "metadata_generated.h" | ||
8 | #include "createentity_generated.h" | ||
9 | #include "dummyresource/resourcefactory.h" | 5 | #include "dummyresource/resourcefactory.h" |
10 | #include "clientapi.h" | 6 | #include "clientapi.h" |
11 | #include "synclistresult.h" | 7 | #include "synclistresult.h" |
diff --git a/tests/genericfacadetest.cpp b/tests/genericfacadetest.cpp index 45ca54d..4c58b91 100644 --- a/tests/genericfacadetest.cpp +++ b/tests/genericfacadetest.cpp | |||
@@ -68,6 +68,11 @@ class GenericFacadeTest : public QObject | |||
68 | Q_OBJECT | 68 | Q_OBJECT |
69 | private Q_SLOTS: | 69 | private Q_SLOTS: |
70 | 70 | ||
71 | void init() | ||
72 | { | ||
73 | Akonadi2::Log::setDebugOutputLevel(Akonadi2::Log::Trace); | ||
74 | } | ||
75 | |||
71 | void testLoad() | 76 | void testLoad() |
72 | { | 77 | { |
73 | Akonadi2::Query query; | 78 | Akonadi2::Query query; |
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index 8d5ee00..8e841cb 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp | |||
@@ -381,6 +381,15 @@ private Q_SLOTS: | |||
381 | 381 | ||
382 | QCOMPARE(result, QByteArray("value2")); | 382 | QCOMPARE(result, QByteArray("value2")); |
383 | } | 383 | } |
384 | |||
385 | void testRecordRevision() | ||
386 | { | ||
387 | Akonadi2::Storage store(testDataPath, dbName, Akonadi2::Storage::ReadWrite); | ||
388 | auto transaction = store.createTransaction(Akonadi2::Storage::ReadWrite); | ||
389 | Akonadi2::Storage::recordRevision(transaction, 1, "uid", "type"); | ||
390 | QCOMPARE(Akonadi2::Storage::getTypeFromRevision(transaction, 1), QByteArray("type")); | ||
391 | QCOMPARE(Akonadi2::Storage::getUidFromRevision(transaction, 1), QByteArray("uid")); | ||
392 | } | ||
384 | }; | 393 | }; |
385 | 394 | ||
386 | QTEST_MAIN(StorageTest) | 395 | QTEST_MAIN(StorageTest) |