mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-13 13:55:50 +00:00
more tests for formatters
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user