Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/testsyncjournaldb.cpp')
-rw-r--r--test/testsyncjournaldb.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/testsyncjournaldb.cpp b/test/testsyncjournaldb.cpp
index 9e412aa85..e01a32f13 100644
--- a/test/testsyncjournaldb.cpp
+++ b/test/testsyncjournaldb.cpp
@@ -163,6 +163,19 @@ private slots:
QVERIFY(!wipedRecord._valid);
}
+ void testNumericId()
+ {
+ SyncJournalFileRecord record;
+
+ // Typical 8-digit padded id
+ record._fileId = "00000001abcd";
+ QCOMPARE(record.numericFileId(), QByteArray("00000001"));
+
+ // When the numeric id overflows the 8-digit boundary
+ record._fileId = "123456789ocidblaabcd";
+ QCOMPARE(record.numericFileId(), QByteArray("123456789"));
+ }
+
private:
SyncJournalDb _db;
};