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 y = 0; y < dimension; y++) {
|
||||
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
|
||||
for (int x = 0; x < dimension; x++) {
|
||||
for (int y = 0; y < dimension; y++) {
|
||||
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() {
|
||||
var palettes = testPalettes();
|
||||
for (Palette palette : palettes) {
|
||||
palette.setAll((x, y, z) -> x + y + z);
|
||||
palette.getAll((x, y, z, value) -> assertEquals(x + y + z, value));
|
||||
palette.setAll((x, y, z) -> x + y + z + 1);
|
||||
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