On Wed, 3 Sep 2025 09:29:33 GMT, John Hendrikx <[email protected]> wrote:
>> modules/javafx.graphics/src/test/java/test/javafx/scene/paint/RadialGradientTest.java
>> line 291:
>>
>>> 289: try {
>>> 290: RadialGradient.valueOf("radial-gradient(radius -100, red
>>> 0%, blue 30%, black 100%)");
>>> 291: fail("IllegalArgument should have been thrown.");
>>
>> nice: these tests do more than a simple `assertThrows` would do.
>
> You can do this actually as `assertThrows` returns the exception thrown:
>
> assertEquals("message", assertThrows(
> IllegalArgumentException.class,
> () -> RadialGradient.valueOf("radial-gradient(radius -100,
> red 0%, blue 30%, black 100%)")
> ).getMessage());
That's true, but I don't want to refactor all of the tests here at this time.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1822#discussion_r2319820527