diff --git a/src/test/java/instance/PaletteTest.java b/src/test/java/instance/PaletteTest.java index 603a6828b..37896b954 100644 --- a/src/test/java/instance/PaletteTest.java +++ b/src/test/java/instance/PaletteTest.java @@ -25,24 +25,32 @@ public class PaletteTest { for (Palette palette : palettes) { final int dimension = palette.dimension(); assertEquals(0, palette.get(0, 0, 0), "Default value should be 0"); + assertEquals(0, palette.size()); palette.set(0, 0, 0, 64); assertEquals(64, palette.get(0, 0, 0)); assertEquals(64, palette.get(dimension, 0, 0), "Coordinate must be rounded to the palette dimension"); + assertEquals(1, palette.size()); palette.set(1, 0, 0, 65); assertEquals(64, palette.get(0, 0, 0)); assertEquals(65, palette.get(1, 0, 0)); + assertEquals(2, palette.size()); palette.set(0, 1, 0, 66); assertEquals(64, palette.get(0, 0, 0)); assertEquals(65, palette.get(1, 0, 0)); assertEquals(66, palette.get(0, 1, 0)); + assertEquals(3, palette.size()); palette.set(0, 0, 1, 67); assertEquals(64, palette.get(0, 0, 0)); assertEquals(65, palette.get(1, 0, 0)); assertEquals(66, palette.get(0, 1, 0)); assertEquals(67, palette.get(0, 0, 1)); + assertEquals(4, palette.size()); + + palette.set(0, 0, 1, 68); + assertEquals(4, palette.size()); } }