From 8c397d1454418fe71738537136051d110703fb07 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 24 Sep 2018 17:19:47 -0700 Subject: [PATCH] t e s t --- .../baritone/utils/pathing/BetterBlockPosTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/java/baritone/utils/pathing/BetterBlockPosTest.java b/src/test/java/baritone/utils/pathing/BetterBlockPosTest.java index 459593b0..13b76c73 100644 --- a/src/test/java/baritone/utils/pathing/BetterBlockPosTest.java +++ b/src/test/java/baritone/utils/pathing/BetterBlockPosTest.java @@ -22,6 +22,7 @@ import net.minecraft.util.math.BlockPos; import org.junit.Test; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class BetterBlockPosTest { @@ -62,7 +63,17 @@ public class BetterBlockPosTest { for (int i = -10; i < 10; i++) { assertEquals(pos.offset(dir, i), better.offset(dir, i)); } + assertTrue(better.offset(dir, 0) == better); } + for (int i = -10; i < 10; i++) { + assertEquals(pos.up(i), better.up(i)); + assertEquals(pos.down(i), better.down(i)); + assertEquals(pos.north(i), better.north(i)); + assertEquals(pos.south(i), better.south(i)); + assertEquals(pos.east(i), better.east(i)); + assertEquals(pos.west(i), better.west(i)); + } + assertTrue(better.offset(null, 0) == better); } public void benchOne() {