Usage of Java assertions in JTreg tests?

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Nov 21 15:36:09 UTC 2022


On 2022-11-17 17:35, Jonathan Gibbons wrote:

>
> It may be worth auditing the tests to see how many tests use `assert`
> and which may be run without assertions enabled. Depending on that
> info, we can decide a better course of action. 

There is a huge amount of assert statements in the Java files in the 
test directory; I got ~570 java files matching on a search for "assert", 
and over 2000 individual hits on "assert". Most of these seem to be 
indeed the assert keywords (a few are comments).

Converting all these to test framework assert calls seems like a 
non-trivial exercise. (But perhaps meaningful to do anyway.)

/Magnus



More information about the jdk-dev mailing list