jtreg test comments: /* vs /** usage
Alan Bateman
alan.bateman at oracle.com
Mon Dec 8 07:06:06 UTC 2025
On 07/12/2025 18:23, Daisuke Yamazaki wrote:
> Hello all,
>
> I noticed that in most jtreg tests, the standard block comment `/* ... */` is
> used for the test directives.
> This is also what official jtreg documentation shows.
>
> However, in some older tests[1], for example QUIC-related tests[2],
> I see`/** ... */` being used instead of `/* ... */`.
>
> Is there any specific reason for using JavaDoc-style comments (`/** ... */`) in
> these tests?
> Are there cases where `/**` beginning is preferred over the regular block
> comment for jtreg directives?
>
jtreg (via the JT harness) looks for @test as the first token in /* ..
*/ comments and doc comments /** .. */. The examples in the tag spec
[1] use traditional comments but the test suites in openjdk/jdk have a
mix. I don't recall any discussion about making this a style issue and
trying to be consistent.
-Alan
[1] https://openjdk.org/jtreg/tag-spec.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/net-dev/attachments/20251208/b1a62016/attachment.htm>
More information about the net-dev
mailing list