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

Hannes Wallnöfer hannesw at openjdk.java.net
Thu Nov 18 11:00:42 UTC 2021


On Fri, 12 Nov 2021 16:28:09 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> This change is mostly about tests. I say "mostly" because while increasing code coverage, which was the primary goal of this exercise, I uncovered a few non-critical bugs and fixed them in-place. The net effect of the change boils down to these code coverage statistics.
>> 
>> before
>> ------
>> 
>> %method	%block	%branch	%line
>> jdk.javadoc.internal.doclets.toolkit.taglets.SnippetTaglet	
>> 75%(12/16)
>> 87%(109/124)
>> 88%(99/112)
>> 85%(140/164)
>> 
>> #classes	%method	%block	%branch	%line
>> jdk.javadoc.internal.doclets.toolkit.taglets.snippet	
>> 70%(80/114)
>> 76%(310/407)
>> 65%(178/273)
>> 81%(413/508)
>> 
>> after
>> -----
>> 
>> %method	%block	%branch	%line
>> jdk.javadoc.internal.doclets.toolkit.taglets.SnippetTaglet	
>> 100%(17/17)
>> 95%(120/126)
>> 93%(103/110)
>> 97%(163/168)
>> 
>> %method	%block	%branch	%line
>> jdk.javadoc.internal.doclets.toolkit.taglets.snippet	
>> 83%(94/112)
>> 85%(348/405)
>> 73%(202/273)
>> 91%(463/505)
>
> 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/TestSnippetTag.java line 71:

> 69:  *    3. ("Inline", "External", "Hybrid")
> 70:  *    4. ("Tag", "Markup")
> 71:  *    5. <custom string>

I assume the purpose of this naming scheme is to make visible what combinations of features are covered by each test. I'm not sure I would consider this enough benefit to justify method names which are very verbose and hard to read (especially when you don't have fresh memory of the scheme above).

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

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


More information about the javadoc-dev mailing list