forked from qt-creator/qt-creator
AutoTest: Introduce ITestConfiguration
Preparation for an additional simpler test configuration which needs to have the same common base. Change-Id: I1800ed5d7301f1aea99eba6ef588a204697bd569 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -162,33 +162,35 @@ bool TestTreeModel::hasTests() const
|
||||
return false;
|
||||
}
|
||||
|
||||
QList<TestConfiguration *> TestTreeModel::getAllTestCases() const
|
||||
QList<ITestConfiguration *> TestTreeModel::getAllTestCases() const
|
||||
{
|
||||
QList<TestConfiguration *> result;
|
||||
QList<ITestConfiguration *> result;
|
||||
for (Utils::TreeItem *frameworkRoot : *rootItem())
|
||||
result.append(static_cast<ITestTreeItem *>(frameworkRoot)->getAllTestConfigurations());
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
|
||||
QList<ITestConfiguration *> TestTreeModel::getSelectedTests() const
|
||||
{
|
||||
QList<TestConfiguration *> result;
|
||||
QList<ITestConfiguration *> result;
|
||||
for (Utils::TreeItem *frameworkRoot : *rootItem())
|
||||
result.append(static_cast<ITestTreeItem *>(frameworkRoot)->getSelectedTestConfigurations());
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<TestConfiguration *> TestTreeModel::getFailedTests() const
|
||||
QList<ITestConfiguration *> TestTreeModel::getFailedTests() const
|
||||
{
|
||||
QList<TestConfiguration *> result;
|
||||
QList<ITestConfiguration *> result;
|
||||
// FIXME limit to frameworks
|
||||
for (Utils::TreeItem *frameworkRoot : *rootItem())
|
||||
result.append(static_cast<ITestTreeItem *>(frameworkRoot)->getFailedTestConfigurations());
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<TestConfiguration *> TestTreeModel::getTestsForFile(const Utils::FilePath &fileName) const
|
||||
QList<ITestConfiguration *> TestTreeModel::getTestsForFile(const Utils::FilePath &fileName) const
|
||||
{
|
||||
QList<TestConfiguration *> result;
|
||||
QList<ITestConfiguration *> result;
|
||||
// FIXME limit to frameworks
|
||||
for (Utils::TreeItem *frameworkRoot : *rootItem())
|
||||
result.append(static_cast<TestTreeItem *>(frameworkRoot)->getTestConfigurationsForFile(fileName));
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user