Archiviert
13
0

Fix PerMaterialTest skipping useful tests for certain blocks

Dieser Commit ist enthalten in:
Thinkofdeath 2015-01-25 11:59:37 +00:00
Ursprung c8f17232cf
Commit df17927d45

Datei anzeigen

@ -41,10 +41,6 @@ public class PerMaterialTest extends AbstractTestingBase {
public static List<Object[]> data() { public static List<Object[]> data() {
List<Object[]> list = Lists.newArrayList(); List<Object[]> list = Lists.newArrayList();
for (Material material : Material.values()) { for (Material material : Material.values()) {
if (INVALIDATED_MATERIALS.contains(material)) {
continue;
}
list.add(new Object[] {material}); list.add(new Object[] {material});
} }
return list; return list;
@ -75,6 +71,8 @@ public class PerMaterialTest extends AbstractTestingBase {
@Test @Test
public void maxDurability() { public void maxDurability() {
if (INVALIDATED_MATERIALS.contains(material)) return;
if (material == Material.AIR) { if (material == Material.AIR) {
assertThat((int) material.getMaxDurability(), is(0)); assertThat((int) material.getMaxDurability(), is(0));
} else if (material.isBlock()){ } else if (material.isBlock()){
@ -85,6 +83,8 @@ public class PerMaterialTest extends AbstractTestingBase {
@Test @Test
public void maxStackSize() { public void maxStackSize() {
if (INVALIDATED_MATERIALS.contains(material)) return;
final ItemStack bukkit = new ItemStack(material); final ItemStack bukkit = new ItemStack(material);
final CraftItemStack craft = CraftItemStack.asCraftCopy(bukkit); final CraftItemStack craft = CraftItemStack.asCraftCopy(bukkit);
if (material == Material.AIR) { if (material == Material.AIR) {