-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
While working on testing custom test engines with Gradle, we discovered that it's not clearly documented if a Type.TEST descriptor is allowed to have children or not, including dynamically added ones.
My opinion on this is that they are not allowed to have children, as that is the whole point of having the container Types. As such, in Gradle, we are planning to forbid this behavior to avoid needing to delay decisions on if a node is really a container or not.
Deliverables
- Describe in
TestDescriptor#getChildrenJavadoc that it must be empty if the descriptor is!isContainer(). - Describe in
TestDescriptor#mayRegisterTestsJavadoc that it must returnfalseif the descriptor is!isContainer(). - (optional) Enforce this in
TestDescriptor#containsTests, and other places that may rely on this assumption.
tresat