RFR: 8344942: Template-Based Testing Framework [v9]

Emanuel Peter epeter at openjdk.org
Wed May 7 12:14:25 UTC 2025


On Wed, 7 May 2025 10:46:58 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>> 
>>  - Merge branch 'master' into JDK-8344942-TemplateFramework-v3
>>  - Whitespace
>>  - Suggestions by Christian
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - typo
>>  - For Christian: example and more intro
>>  - fix hashtag
>>  - manual merge
>>  - Apply suggestions from code review
>>    
>>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>>  - move library
>>  - Merge branch 'master' into JDK-8344942-TemplateFramework-v3
>>  - ... and 6 more: https://git.openjdk.org/jdk/compare/0844745e...fae7ced6
>
> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 81:
> 
>> 79:  * }
>> 80:  *
>> 81:  * To get an executable test, we define a class Template, which takes a list of types,
> 
> Not entirely clear what you mean with "a class Template". Do you mean "we define a Template"?

I meant to say "a Template that has a class body with a main method" or similar. Will update the comment.

> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 126:
> 
>> 124:  *     new Type("long",   () -> GEN_LONG.next(),   List.of("+", "-", "*", "&", "|", "^")),
>> 125:  *     new Type("float",  () -> GEN_FLOAT.next(),  List.of("+", "-", "*", "/")),
>> 126:  *     new Type("double", () -> GEN_DOUBLE.next(), List.of("+", "-", "*", "/"))
> 
> Same here as commented earlier: You can directly use `GEN_X::next()`.

done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2077483285
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2077486002


More information about the hotspot-compiler-dev mailing list