mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-08 03:40:27 +01:00
Test palette size
This commit is contained in:
parent
4a46065a67
commit
aac07c8ef1
@ -117,15 +117,16 @@ public class PaletteTest {
|
|||||||
for (int x = 0; x < dimension; x++) {
|
for (int x = 0; x < dimension; x++) {
|
||||||
for (int y = 0; y < dimension; y++) {
|
for (int y = 0; y < dimension; y++) {
|
||||||
for (int z = 0; z < dimension; z++) {
|
for (int z = 0; z < dimension; z++) {
|
||||||
palette.set(x, y, z, x + y + z);
|
palette.set(x, y, z, x + y + z + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
assertEquals(palette.maxSize(), palette.size());
|
||||||
// Verify
|
// Verify
|
||||||
for (int x = 0; x < dimension; x++) {
|
for (int x = 0; x < dimension; x++) {
|
||||||
for (int y = 0; y < dimension; y++) {
|
for (int y = 0; y < dimension; y++) {
|
||||||
for (int z = 0; z < dimension; z++) {
|
for (int z = 0; z < dimension; z++) {
|
||||||
assertEquals(x + y + z, palette.get(x, y, z));
|
assertEquals(x + y + z + 1, palette.get(x, y, z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,8 +137,9 @@ public class PaletteTest {
|
|||||||
public void bulkAll() {
|
public void bulkAll() {
|
||||||
var palettes = testPalettes();
|
var palettes = testPalettes();
|
||||||
for (Palette palette : palettes) {
|
for (Palette palette : palettes) {
|
||||||
palette.setAll((x, y, z) -> x + y + z);
|
palette.setAll((x, y, z) -> x + y + z + 1);
|
||||||
palette.getAll((x, y, z, value) -> assertEquals(x + y + z, value));
|
assertEquals(palette.maxSize(), palette.size());
|
||||||
|
palette.getAll((x, y, z, value) -> assertEquals(x + y + z + 1, value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user