RFR: 8254129: IR Test Framework to support regex-based matching on the IR in JTreg compiler tests [v2]
Igor Ignatyev
iignatyev at openjdk.java.net
Fri Apr 16 18:27:40 UTC 2021
On Fri, 16 Apr 2021 01:48:49 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:
>> Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Adjust whitelist
>
> test/lib/jdk/test/lib/hotspot/ir_framework/TestFramework.java line 639:
>
>> 637: TestFormat.check(!scenarioIndices.contains(scenarioIndex),
>> 638: "Cannot define two scenarios with the same index " + scenarioIndex);
>> 639: scenarioIndices.add(scenarioIndex);
>
> you can use `Set::add` to verify that the element isn't in a set:
> Suggestion:
>
> TestFormat.check(scenarioIndices.add(scenarioIndex),
> "Cannot define two scenarios with the same index " + scenarioIndex);
also, shouldn't this check be done as part of `addScenarios`?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3508
More information about the hotspot-dev
mailing list