Some test improvements

This commit is contained in:
2016-06-03 01:37:23 +03:00
parent 620c4bd1e3
commit ab01c9fa08
7 changed files with 29 additions and 20 deletions

View File

@ -26,7 +26,9 @@
void TestAbstractExtItem::initTestCase()
{
generateFilename();
auto names = AWTestLibrary::randomFilenames();
fileName = names.first;
writeFileName = names.second;
extItem = new ExtUpgrade(nullptr, fileName);
extItem->setActive(false);
@ -108,18 +110,4 @@ void TestAbstractExtItem::test_copy()
}
void TestAbstractExtItem::generateFilename()
{
fileName = QString("%1/").arg(
QStandardPaths::writableLocation(QStandardPaths::TempLocation));
writeFileName = QString("%1/awesomewidgets/tmp/")
.arg(QStandardPaths::writableLocation(
QStandardPaths::GenericDataLocation));
QString name = AWTestLibrary::randomString(20);
fileName += name;
writeFileName += name;
}
QTEST_MAIN(TestAbstractExtItem);