google / google/compile-testing
generatesSources() requires that expected paths be exact suffixes of generated paths
- Dominant language
- Java
- Stars
- 722
- Forks
- 129
- Avg merge
- 11m
- Merged PRs (30d)
- 4
Description
The way the `generatesSources()` clause is implemented seems to indicate that it wants to enforce that the paths to expected sources be exact suffixes of the paths in all generated sources. This imposes an inconvenient structure on testing directories.
`ResourceSourceJavaFileObject`s are assigned a URI upon creation that is equal to the resource path. `generatesSources()` has a failure mode which is triggered when `!generatedResourceURI.getPath().endsWith(expectedResourceURI.getPath())`.
This forces users to put the resources that contain expected sources in the target directory for their corresponding generated sources.
Contributor guide
Assessment
This issue has not been assessed yet.