RFR: JEP 359-Records: compiler code

Brian Goetz brian.goetz at oracle.com
Sun Nov 17 21:24:10 UTC 2019

> * I noted that, while we have many diagnostics tests, we have 
> basically zero negative tests to check that the compiler is generating 
> the desired error message _without any additional_ spurious errors. In 
> principle, there should be at least one negative test for each 
> record-related error message. This leads to replication with the 
> diagnostics tests, but we've always done it this way. The diagnostic 
> framework is for diagnostics - per se, it is insufficient to verify 
> good quality of compiler output.

I propose that we beef up CompilationTestCase to be able to make such 
assertions (right now we assert that the specified error is there, but 
we can also assert that others are not.)  Similarly we can beef this up 
to support correct location testing if desired.

> * I suggest maybe to group tests in different folders depending on the 
> 'category' they fall in. E.g. I see you have a reflection test and a 
> serialization test, then some annotation processing tests - it would 
> be nice to label these accordingly by putting them in separate folders.

As we discussed last week, perhaps some guidance on what the categories 
should be -- and the right testing strategy for each category -- would 
help in uniformity of coverage.

More information about the compiler-dev mailing list