bulkAll and bulkAllOrder

This commit is contained in:
themode 2022-01-04 15:42:03 +01:00 committed by TheMode
parent 29bbc39a1a
commit 2eae1e2cdc

View File

@ -136,6 +136,23 @@ public class PaletteTest {
@Test
public void bulkAll() {
var palettes = testPalettes();
for (Palette palette : palettes) {
// Fill all entries
palette.setAll((x, y, z) -> x + y + z + 1);
palette.getAll((x, y, z, value) -> assertEquals(x + y + z + 1, value));
// Replacing
palette.replaceAll((x, y, z, value) -> {
assertEquals(x + y + z + 1, value);
return x + y + z + 2;
});
palette.getAll((x, y, z, value) -> assertEquals(x + y + z + 2, value));
}
}
@Test
public void bulkAllOrder() {
var palettes = testPalettes();
for (Palette palette : palettes) {
AtomicInteger count = new AtomicInteger();