google / google/compile-testing

generatesSources() fails, but doesn't attempt to compare like to like

Open
#18 7 comments 0 reactions 0 assignees View on GitHub
P4 type=enhancement
Dominant language
Java
Stars
722
Forks
129
Avg merge
11m
Merged PRs (30d)
4

Description

generatesSources() scans all sources for all expected sources, but in the case of a failure, only reports boolean failure. In the case where code is improperly generated, but some code is generated purportedly against a given type/filename, there is no display of "expected" vs. "actual" for comparison, and the user is left to guess at the result.

I wonder if the scanning could be done at the level of filename first, seeing if a file was generated as expected at all - since JavaSourceFile does already contain a notion of filename. THEN the equality scanner could be used against the result, and if there is failure, show "expected this, but got that". The current model is better than string comparison, but still too brittle to be truly useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.