2019-09-08 14:18:58 +03:00
|
|
|
#ifndef TESTUTILS_H
|
|
|
|
#define TESTUTILS_H
|
|
|
|
|
|
|
|
#include <QSet>
|
|
|
|
|
|
|
|
class TestUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestUtils();
|
2019-09-23 14:26:45 +03:00
|
|
|
QSet<QString> getTree(const QString& path, int limit = -1, int depch = 0);
|
2019-09-11 13:09:09 +03:00
|
|
|
QSet<QString> createTree( const QStringList& tree);
|
|
|
|
|
2019-09-08 14:18:58 +03:00
|
|
|
/**
|
|
|
|
* @brief compareTree - compare 2 tree
|
|
|
|
* @param leftTree
|
|
|
|
* @param rightTree
|
|
|
|
* @return hash with pathes and indexes( 1 - missing left and -1 - missing right)
|
|
|
|
*/
|
|
|
|
QHash<QString, int> compareTree(const QSet<QString>& leftTree, const QSet<QString>& rightTree);
|
|
|
|
|
2019-09-13 18:21:53 +03:00
|
|
|
private:
|
|
|
|
QString getFilePath(const QString &i);
|
2019-09-08 14:18:58 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TESTUTILS_H
|