AutoTest: Fix handling of unnamed QuickTests

..now that the parser understands multiple TestCase items
inside a single qml file.
As long a test function is located inside a different TestCase
it is considered as a different one, so treat test functions
even of unnamed test cases correct.

Change-Id: I5cbfe1f63f896317523d51bbf67ea59169481a71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2019-07-30 15:14:40 +02:00
parent abe3dde5d6
commit 8cd7a11926
6 changed files with 37 additions and 10 deletions

View File

@@ -95,7 +95,8 @@ bool QtTestResult::isDirectParentOf(const TestResult *other, bool *needsIntermed
return qtOther->m_dataTag == m_dataTag;
}
} else if (qtOther->isTestFunction()) {
return isTestCase() || m_function == qtOther->m_function;
return isTestCase() || (m_function == qtOther->m_function
&& qtOther->result() != ResultType::TestStart);
}
}
return false;