diff --git a/test/persistence/dbupgrade/dbTo11_test.cpp b/test/persistence/dbupgrade/dbTo11_test.cpp index 4b9618922..c758ffc09 100644 --- a/test/persistence/dbupgrade/dbTo11_test.cpp +++ b/test/persistence/dbupgrade/dbTo11_test.cpp @@ -71,11 +71,9 @@ void appendVerifyChatsQueries(QVector& verifyQueries) }}); struct Functor { - int index = 0; const std::vector chatIds{aPk.getByteArray(), bPk.getByteArray(), cPk.getByteArray()}; void operator()(const QVector& row) { - QVERIFY(row[0].toByteArray() == chatIds[index]); - ++index; + QVERIFY(std::find(chatIds.begin(), chatIds.end(), row[0].toByteArray()) != chatIds.end()); } }; @@ -93,11 +91,9 @@ void appendVerifyAuthorsQueries(QVector& verifyQueries) }}); struct Functor { - int index = 0; - const std::vector chatIds{selfPk.getByteArray(), aPk.getByteArray(), bPk.getByteArray()}; + const std::vector authorIds{selfPk.getByteArray(), aPk.getByteArray(), bPk.getByteArray()}; void operator()(const QVector& row) { - QVERIFY(row[0].toByteArray() == chatIds[index]); - ++index; + QVERIFY(std::find(authorIds.begin(), authorIds.end(), row[0].toByteArray()) != authorIds.end()); } }; @@ -128,11 +124,9 @@ void appendVerifyAliasesQueries(QVector& verifyQueries) }}); struct Functor { - int index = 0; const std::vector names{selfName.toUtf8(), aName.toUtf8(), bName.toUtf8()}; void operator()(const QVector& row) { - QVERIFY(row[0].toByteArray() == names[index]); - ++index; + QVERIFY(std::find(names.begin(), names.end(), row[0].toByteArray()) != names.end()); } };