Bladeren bron

#2279 Add a NEGLIGIBLY_DIFFERENT colour into the report

Richard Tingle 10 maanden geleden
bovenliggende
commit
63d97c14cf

+ 1 - 0
jme3-screenshot-tests/src/main/java/org/jmonkeyengine/screenshottests/testframework/PixelSamenessDegree.java

@@ -38,6 +38,7 @@ import com.jme3.math.ColorRGBA;
  */
 public enum PixelSamenessDegree{
     SAME(1, null),
+    NEGLIGIBLY_DIFFERENT(1, ColorRGBA.Green),
     SUBTLY_DIFFERENT(10, ColorRGBA.Blue),
 
     MEDIUMLY_DIFFERENT(20, ColorRGBA.Yellow),

+ 2 - 2
jme3-screenshot-tests/src/main/java/org/jmonkeyengine/screenshottests/testframework/TestDriver.java

@@ -426,8 +426,8 @@ public class TestDriver extends BaseAppState{
 
         int pixelDifference = getMaximumComponentDifference(pixel1, pixel2);
 
-        if(pixelDifference<= PixelSamenessDegree.SAME.getMaximumAllowedDifference()){
-            return PixelSamenessDegree.SAME;
+        if(pixelDifference<= PixelSamenessDegree.NEGLIGIBLY_DIFFERENT.getMaximumAllowedDifference()){
+            return PixelSamenessDegree.NEGLIGIBLY_DIFFERENT;
         }
         if(pixelDifference<= PixelSamenessDegree.SUBTLY_DIFFERENT.getMaximumAllowedDifference()){
             return PixelSamenessDegree.SUBTLY_DIFFERENT;