Skip to content

Commit

Permalink
"fix" macos tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreSchwang committed Aug 30, 2024
1 parent 3551459 commit 61eeb4c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
import com.sk89q.worldedit.world.block.BlockTypesCache;
import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
import org.junit.jupiter.api.parallel.Isolated;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

import javax.annotation.concurrent.NotThreadSafe;
import java.util.Arrays;
import java.util.stream.Stream;

Expand All @@ -17,6 +21,7 @@
class IBatchProcessorTest {

@Nested
@Isolated
class trimY {

private static final char[] CHUNK_DATA = new char[16 * 16 * 16];
Expand Down Expand Up @@ -67,7 +72,7 @@ void testFullChunkSelectedInBoundedRegion(int minY, int maxY) {
// kinda the same for the highest layer - just the other way around
if (layer == maxYSection) {
char[] expected = Arrays.copyOf(CHUNK_DATA, CHUNK_DATA.length);
Arrays.fill(expected, (maxY & 15) << 8, expected.length, (char) BlockTypesCache.ReservedIDs.__RESERVED__);
Arrays.fill(expected, ((maxY + 1) & 15) << 8, expected.length, (char) BlockTypesCache.ReservedIDs.__RESERVED__);
assertArrayEquals(
expected, blocks,
"expected in-range blocks at layer=%d to be AIR - out-of-range __RESERVED__"
Expand All @@ -87,6 +92,7 @@ private static Stream<Arguments> provideTrimYInBoundsParameters() {
Arguments.of(64, 72),
Arguments.of(-64, 0),
Arguments.of(0, 128),
Arguments.of(16, 132),
Arguments.of(4, 144),
Arguments.of(12, 255),
Arguments.of(24, 103)
Expand Down

0 comments on commit 61eeb4c

Please sign in to comment.