more tests for formatters

This commit is contained in:
2016-05-30 01:47:06 +03:00
parent cae9e0d2e3
commit 69c09d9ff8
17 changed files with 313 additions and 69 deletions

View File

@ -18,6 +18,8 @@
#include "awtestlibrary.h"
#include <QSet>
char AWTestLibrary::randomChar()
{
@ -59,3 +61,17 @@ QStringList AWTestLibrary::randomStringList(const int max)
return output;
}
QStringList AWTestLibrary::randomSelect(const QStringList available)
{
QSet<QString> output;
int count = 1 + randomInt(available.count());
for (int i = 0; i < count; i++) {
int index = randomInt(available.count());
output << available.at(index);
}
return output.toList();
}