diff options
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) |