On Wed, 9 Nov 2022 18:38:27 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Issue happening on some hardware due to slightly different pixel values >> being returned. >> >> Increased tolerance of asserts in compareColor function to allow these tests >> to pass (0.01 delta is still tighter than other similar tests which use >> 0.07). > > tests/system/src/test/java/test/robot/javafx/scene/PixelBufferDrawTest.java > line 189: > >> 187: >> 188: private void compareColor(Color exp, Color act) { >> 189: Assert.assertEquals(exp.getRed(), act.getRed(), 0.01); > > Since the tolerance value is used 4 times, maybe consider using a variable? > Since this is preexisting, I'll approve it anyway and leave it up to you as > to whether to change it. Since someone initially chose a value w/o justification, perhaps we should create a constant and describe it (using Kevin's comment as a starting point). ------------- PR: https://git.openjdk.org/jfx/pull/944