RFR: JDK-8306990: The guarantees given by Region's floor and ceiling functions should work for larger values [v2]
John Hendrikx
jhendrikx at openjdk.org
Thu Apr 27 19:56:31 UTC 2023
On Thu, 27 Apr 2023 19:04:39 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> John Hendrikx has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Print seed if test fails
>> - Merge branch 'master' into feature/ceil-fix
>> - Fix Region ceil/floor function guarantees to be more accurate
>
> modules/javafx.graphics/src/test/java/test/javafx/scene/layout/RegionTest.java line 1281:
>
>> 1279: }
>> 1280:
>> 1281: random.setSeed(seed);
>
> it might be better to set the seed only once at the beginning. otherwise the next 2 tests use the same sequence of doubles due to the seed being the same.
> or is this intentional?
What are we trying to achieve here I'm wondering? Because if it is to slowly exhaustively test more and more of the problem space during each build, then I really disagree with the methodology.
We're confident that this is the correct solution at this time. The test is only there to prevent regressions to the old broken situation.
If you argued that it's a poor test, I'd agree; it is a poor test, and has been since the beginning; I can trivially pass the test with a code change that it would not detect as faulty (returning a constant, using round, etc. would all pass this test).
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1118#discussion_r1179599042
More information about the openjfx-dev
mailing list