refactor: refresh aw plugin

This commit is contained in:
2024-04-16 18:33:19 +03:00
parent 54acc5f780
commit 397b523180
41 changed files with 251 additions and 305 deletions

View File

@ -73,7 +73,7 @@ QString AWTestLibrary::randomString(const int _min, const int _max)
QString output;
auto count = _min + randomInt(_max - _min);
for (auto i = 0; i < count; i++)
for (auto i = 0; i < count; ++i)
output += randomChar();
return output;
@ -85,7 +85,7 @@ QStringList AWTestLibrary::randomStringList(const int _max)
QStringList output;
auto count = 1 + randomInt(_max);
for (auto i = 0; i < count; i++)
for (auto i = 0; i < count; ++i)
output.append(randomString());
return output;
@ -97,7 +97,7 @@ QStringList AWTestLibrary::randomSelect(const QStringList &_available)
QSet<QString> output;
auto count = 1 + randomInt(_available.count());
for (auto i = 0; i < count; i++) {
for (auto i = 0; i < count; ++i) {
auto index = randomInt(_available.count());
output << _available.at(index);
}

View File

@ -55,7 +55,7 @@ void TestAWPatternFunctions::test_findKeys()
{
auto count = AWTestLibrary::randomInt(200);
QStringList allKeys;
for (auto i = 0; i < count; i++) {
for (auto i = 0; i < count; ++i) {
auto key = AWTestLibrary::randomString(1, 20);
while (allKeys.indexOf(QRegularExpression(QString("^%1.*").arg(key))) != -1)
key = AWTestLibrary::randomString(1, 20);

View File

@ -73,7 +73,7 @@ void TestAWJsonFormatter::generate()
auto listCount = AWTestLibrary::randomInt(5) + 1;
auto validCount = AWTestLibrary::randomInt(listCount);
QVariantList second;
for (auto i = 0; i < listCount; i++) {
for (auto i = 0; i < listCount; ++i) {
if (i == validCount) {
second.append(first);
} else {