diff options
author | Minijackson <minijackson@riseup.net> | 2018-06-27 11:12:38 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-07-04 15:37:14 +0200 |
commit | 016fea734d09df707be9a16a4ad6a1107f41549f (patch) | |
tree | 60bf9767842713538505fca80515a8f5e59ca985 /tests/storagetest.cpp | |
parent | c90ba4a98292a39eb0b3df12fd7e2dec0300e58d (diff) | |
download | sink-016fea734d09df707be9a16a4ad6a1107f41549f.tar.gz sink-016fea734d09df707be9a16a4ad6a1107f41549f.zip |
Fix pipelinetest + remove useless commented lines
Diffstat (limited to 'tests/storagetest.cpp')
-rw-r--r-- | tests/storagetest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index d3f180a..2ddbebf 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp | |||
@@ -457,10 +457,11 @@ private slots: | |||
457 | auto db = transaction.openDatabase("test", nullptr, false); | 457 | auto db = transaction.openDatabase("test", nullptr, false); |
458 | const auto uid = "{c5d06a9f-1534-4c52-b8ea-415db68bdadf}"; | 458 | const auto uid = "{c5d06a9f-1534-4c52-b8ea-415db68bdadf}"; |
459 | //Ensure we can sort 1 and 10 properly (by default string comparison 10 comes before 6) | 459 | //Ensure we can sort 1 and 10 properly (by default string comparison 10 comes before 6) |
460 | const auto key1 = Sink::Storage::Key(Sink::Storage::Identifier::fromDisplayByteArray(uid), 6); | 460 | const auto id = Sink::Storage::Identifier::fromDisplayByteArray(uid); |
461 | db.write(key1.toInternalByteArray(), "value1"); | 461 | auto key = Sink::Storage::Key(id, 6); |
462 | const auto key2 = Sink::Storage::Key(Sink::Storage::Identifier::fromDisplayByteArray(uid), 10); | 462 | db.write(key.toInternalByteArray(), "value1"); |
463 | db.write(key2.toInternalByteArray(), "value2"); | 463 | key.setRevision(10); |
464 | db.write(key.toInternalByteArray(), "value2"); | ||
464 | db.findLatest(uid, [&](const QByteArray &key, const QByteArray &value) { result = value; }); | 465 | db.findLatest(uid, [&](const QByteArray &key, const QByteArray &value) { result = value; }); |
465 | QCOMPARE(result, QByteArray("value2")); | 466 | QCOMPARE(result, QByteArray("value2")); |
466 | } | 467 | } |