mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-26 19:09:44 -05:00
1 parent
dc652253ed
commit
4c0157d6de
3 files changed
+79
-4
No files matched your search
@@ -176,12 +176,21 @@ public class LocationTest {
|
||||
assertThat(vector.getZ(), is(closeTo(z, delta)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEquals() {
|
||||
Location first = getLocation().add(getVector());
|
||||
Location second = getLocation().add(getVector());
|
||||
|
||||
assertThat(first.hashCode(), is(second.hashCode()));
|
||||
assertThat(first, is(second));
|
||||
}
|
||||
|
||||
private Vector getVector() {
|
||||
return new Vector(x, y, z);
|
||||
}
|
||||
|
||||
private static Location getEmptyLocation() {
|
||||
return new Location(null, 0, 0, 0);
|
||||
return new Location(TestWorld.INSTANCE, 0, 0, 0);
|
||||
}
|
||||
|
||||
private Location getLocation() {
|
||||
|
||||
Reference in new issue
Block a user