RFR: 8273544: Increase test coverage for snippets [v2]

Pavel Rappo prappo at openjdk.java.net
Fri Nov 19 14:55:44 UTC 2021


On Thu, 18 Nov 2021 17:34:12 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Test one more corner case example
>
> test/langtools/jdk/javadoc/doclet/testSnippetTag/TestSnippetMarkup.java line 71:
> 
>> 69:  * @build javadoc.tester.* toolbox.ToolBox toolbox.ModuleBuilder builder.ClassBuilder
>> 70:  * @run main TestSnippetMarkup
>> 71:  */
> 
> The standard convention is to put the jtreg comment right after the legal header, before the imports.

I was surprised to hear that this is a convention, so much so that I wrote a script to survey the JDK tests in this regard. The script showed that while what you said is true for javadoc, it is not so true for other areas (even in langtools). That said, I can see the rationale for having this convention and will update the snippet tests accordingly.

Separately. If there's a value in mass-fixing the JDK tests so that they follow this convention, I can create a PR to do that. Here are some numbers provided by the script, to assess the situation. There are 32,920 `test/**/*.java` files. Of these, 19,190 have jtreg comments. Of these, 4,284 (or 22%) do not follow the convention one way or another. If pursued, that might result in an extremely tedious-to-review PR.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6359


More information about the javadoc-dev mailing list