forked from qt-creator/qt-creator
AutoTest: Add suite layer for tests
Test suites are used in several test frameworks. To avoid fiddling around with the types and their meaning on the frameworks side just add another type (TestSuite) that can be used. Frameworks can use or ignore this type as it is done already for other types. Change-Id: I6c2a312a32ce5716f55b49303e2b1a0f6f8e8da4 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -171,10 +171,10 @@ QList<TestTreeItem *> TestTreeModel::testItemsByName(TestTreeItem *root, const Q
|
||||
QList<TestTreeItem *> result;
|
||||
|
||||
root->forFirstLevelChildren([&testName, &result, this](TestTreeItem *node) {
|
||||
if (node->type() == TestTreeItem::TestCase) {
|
||||
if (node->type() == TestTreeItem::TestSuite || node->type() == TestTreeItem::TestCase) {
|
||||
if (node->name() == testName) {
|
||||
result << node;
|
||||
return; // prioritize Tests over TestCases
|
||||
return; // prioritize test suites and cases over test functions
|
||||
}
|
||||
TestTreeItem *testCase = node->findFirstLevelChild([&testName](TestTreeItem *it) {
|
||||
QTC_ASSERT(it, return false);
|
||||
|
||||
Reference in New Issue
Block a user