RFR: 8360178: TestArguments.atojulong gtest has incorrect format string [v2]

David Holmes dholmes at openjdk.org
Wed Jun 25 04:16:29 UTC 2025


On Tue, 24 Jun 2025 15:19:17 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> test/hotspot/gtest/runtime/test_arguments.cpp line 32:
>> 
>>> 30: #include <errno.h>
>>> 31: 
>>> 32: #include "unittest.hpp"
>> 
>> Is there a rule/guideline that says this should be placed here?
>
> The unittest.hpp include is clearly improperly ordered, so should be moved.
> The question is, where to. It's very common for it to be the last include.
> And the header itself suggests it is supposed to be last:
> https://github.com/openjdk/jdk/blob/0514cee6c884b6d31735551b8a3ce7a2be661094/test/hotspot/gtest/unittest.hpp#L46-L47
> 
> My recollection is that there used to be documentation (possibly internal or
> preliminatry during development of gtest support) that it needed to be last.
> But that doesn't seem to have made it into the public documentation. It was
> left out of the style guide include order rules because it was still under
> discussion / investigation.

We should try to get that documented as this arose in another PR last week.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25927#discussion_r2165668338


More information about the hotspot-runtime-dev mailing list