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

Emanuel Peter epeter at openjdk.org
Fri May 23 10:06:11 UTC 2025


On Fri, 23 May 2025 09:15:52 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Apply suggestions from code review
>>   
>>   Co-authored-by: Roberto Castañeda Lozano <robcasloz at users.noreply.github.com>
>
> test/hotspot/jtreg/testlibrary_tests/template_framework/examples/TestTutorial.java line 332:
> 
>> 330:             // The Hook is set for the Tokens inside the set braces.
>> 331:             // As long as the hook is anchored, we can insert code into the hook,
>> 332:             // here we can define static fields for example.
> 
> Perhaps this comment should mention that the code is inserted at the point where `myHook.anchor` is located.

I though that's what I said 😅 
I reformulated it, and hope it is clearer now.

![image](https://github.com/user-attachments/assets/fb51a98d-d0c6-44ae-a414-557c38ff9639)

> test/hotspot/jtreg/testlibrary_tests/template_framework/examples/TestTutorial.java line 636:
> 
>> 634:         var templateStatus = Template.make(() -> body(
>> 635:             let("ints", dataNames(MUTABLE).exactOf(myInt).count()),
>> 636:             let("longs", dataNames(MUTABLE).exactOf(myLong).count()),
> 
> Suggestion:
> 
>             let("ints", dataNames(MUTABLE_OR_IMMUTABLE).exactOf(myInt).count()),
>             let("longs", dataNames(MUTABLE_OR_IMMUTABLE).exactOf(myLong).count()),

Same here. Want to keep it simple for now, we cover the concept only later on. Added a comment for that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2104255537
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2104262459


More information about the hotspot-compiler-dev mailing list