mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
This doesn't belong in the main branch
This commit is contained in:
parent
491df2cc82
commit
97c95c1c49
@ -1,35 +0,0 @@
|
|||||||
package com.gmail.nossr50.util.blockmeta;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
|
|
||||||
public class PrimitiveExChunkletStoreTest {
|
|
||||||
byte addresses[][] = new byte[16][16];
|
|
||||||
|
|
||||||
@Before
|
|
||||||
public void populateAddresses() {
|
|
||||||
for (int x = 0; x < 16; x++) {
|
|
||||||
for (int z = 0; z < 16; z++) {
|
|
||||||
addresses[x][z] = PrimitiveExChunkletStore.makeAddressByte(x, z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void addressMakeTest() {
|
|
||||||
assertEquals(addresses[0][0], 0);
|
|
||||||
assertEquals(addresses[15][15], -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void addressReverseTest() {
|
|
||||||
for (int x = 0; x < 16; x++) {
|
|
||||||
for (int z = 0; z < 16; z++) {
|
|
||||||
assertEquals(x, PrimitiveExChunkletStore.addressByteX(addresses[x][z]));
|
|
||||||
assertEquals(z, PrimitiveExChunkletStore.addressByteZ(addresses[x][z]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user