1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
// SPDX-FileCopyrightText: 2025 Filipe Azevedo <pasnox@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
#include "Test.h"
// Qt
#include <QStandardPaths>
#include <QTest>
void Test::initTestCase()
{
QStandardPaths::setTestModeEnabled(true);
// Remove old test data.
removeTestDataDirectory();
}
void Test::removeTestDataDirectory()
{
const auto testDirectoryPath = QStandardPaths::writableLocation(QStandardPaths::StandardLocation::AppDataLocation);
if (auto testDirectory = QDir(testDirectoryPath); testDirectory.exists()) {
QVERIFY(testDirectory.removeRecursively());
}
}
#include "moc_Test.cpp"
|