diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pipelinetest.cpp | 2 | ||||
-rw-r--r-- | tests/storagetest.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/pipelinetest.cpp b/tests/pipelinetest.cpp index 47d443f..34ee3a5 100644 --- a/tests/pipelinetest.cpp +++ b/tests/pipelinetest.cpp | |||
@@ -35,7 +35,7 @@ static QList<Sink::Storage::Key> getKeys(const QByteArray &dbEnv, const QByteArr | |||
35 | auto db = transaction.openDatabase(name, nullptr, false); | 35 | auto db = transaction.openDatabase(name, nullptr, false); |
36 | QList<Sink::Storage::Key> result; | 36 | QList<Sink::Storage::Key> result; |
37 | db.scan("", [&](const QByteArray &key, const QByteArray &value) { | 37 | db.scan("", [&](const QByteArray &key, const QByteArray &value) { |
38 | size_t revision = *reinterpret_cast<const char *>(key.constData()); | 38 | size_t revision = Sink::byteArrayToSizeT(value); |
39 | result << Sink::Storage::Key(Sink::Storage::Identifier::fromDisplayByteArray( | 39 | result << Sink::Storage::Key(Sink::Storage::Identifier::fromDisplayByteArray( |
40 | Sink::Storage::DataStore::getUidFromRevision(transaction, revision)), | 40 | Sink::Storage::DataStore::getUidFromRevision(transaction, revision)), |
41 | revision); | 41 | revision); |
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index 39fd380..925d1d9 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp | |||
@@ -838,8 +838,8 @@ private slots: | |||
838 | const size_t number1 = 1; | 838 | const size_t number1 = 1; |
839 | const size_t number2 = 2; | 839 | const size_t number2 = 2; |
840 | 840 | ||
841 | const QByteArray number1BA = QByteArray::fromRawData(reinterpret_cast<const char*>(&number1), sizeof(size_t)); | 841 | const QByteArray number1BA = Sink::sizeTToByteArray(number1); |
842 | const QByteArray number2BA = QByteArray::fromRawData(reinterpret_cast<const char*>(&number2), sizeof(size_t)); | 842 | const QByteArray number2BA = Sink::sizeTToByteArray(number2); |
843 | 843 | ||
844 | db.write(0, number1BA); | 844 | db.write(0, number1BA); |
845 | db.write(1, number2BA); | 845 | db.write(1, number2BA); |