mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-13 21:13:53 +00:00
reduce diff
This commit is contained in:
@ -21,6 +21,7 @@ package com.sk89q.worldedit.extent.transform;
|
||||
|
||||
import com.sk89q.worldedit.math.transform.AffineTransform;
|
||||
import com.sk89q.worldedit.math.transform.Transform;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@ -37,30 +38,32 @@ public class BlockTransformExtentTest {
|
||||
private static final Transform ROTATE_NEG_90 = new AffineTransform().rotateY(90);
|
||||
private final Set<BlockType> ignored = new HashSet<>();
|
||||
|
||||
/*
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
//BlockType.REGISTRY.register("worldedit:test", new BlockType("worldedit:test"));
|
||||
BlockType.REGISTRY.register("worldedit:test", new BlockType("worldedit:test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTransform() {
|
||||
// for (BlockType type : BlockType.REGISTRY.values()) {
|
||||
// if (ignored.contains(type)) {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// BlockState base = type.getDefaultState();
|
||||
// BlockState rotated = base;
|
||||
//
|
||||
// for (int i = 1; i < 4; i++) {
|
||||
// rotated = BlockTransformExtent.transform(base, ROTATE_90);
|
||||
// }
|
||||
// assertEquals(base, rotated);
|
||||
// rotated = base;
|
||||
// for (int i = 1; i < 4; i++) {
|
||||
// rotated = BlockTransformExtent.transform(base, ROTATE_NEG_90);
|
||||
// }
|
||||
// assertEquals(base, rotated);
|
||||
// }
|
||||
for (BlockType type : BlockType.REGISTRY.values()) {
|
||||
if (ignored.contains(type)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
BlockState base = type.getDefaultState();
|
||||
BlockState rotated = base;
|
||||
|
||||
for (int i = 1; i < 4; i++) {
|
||||
rotated = BlockTransformExtent.transform(base, ROTATE_90);
|
||||
}
|
||||
assertEquals(base, rotated);
|
||||
rotated = base;
|
||||
for (int i = 1; i < 4; i++) {
|
||||
rotated = BlockTransformExtent.transform(base, ROTATE_NEG_90);
|
||||
}
|
||||
assertEquals(base, rotated);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -20,31 +20,17 @@
|
||||
package com.sk89q.worldedit.internal.expression;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
|
||||
|
||||
import java.time.Duration;
|
||||
import com.sk89q.worldedit.internal.expression.runtime.ExpressionTimeoutException;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
import static java.lang.Math.atan2;
|
||||
import static java.lang.Math.sin;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
class ExpressionTest extends BaseExpressionTest {
|
||||
|
||||
private Platform mockPlat = mock(Platform.class);
|
||||
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
WorldEdit.getInstance().getPlatformManager().unregister(mockPlat);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEvaluate() throws ExpressionException {
|
||||
// check
|
||||
|
@ -56,7 +56,7 @@ public class LocationTest {
|
||||
World world = mock(World.class);
|
||||
Vector3 position = Vector3.at(1, 1, 1);
|
||||
Location location = new Location(world, position);
|
||||
assertEquals(position, location);
|
||||
assertEquals(position, location.toVector());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user