mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
Fixed test cases for 1.11 changes.
This commit is contained in:
1 parent
c459b87ec9
commit
648067efc2
4 files changed
+34
-8
No files matched your search
@@ -31,10 +31,10 @@ public class VanillaRegistryTests
|
||||
public void testSetup()
|
||||
{
|
||||
// All the blocks loaded
|
||||
assertEquals("We have all the blocks via GameData",219,Block.REGISTRY.getKeys().size());
|
||||
assertEquals("We have all the blocks via GameData",236,Block.REGISTRY.getKeys().size());
|
||||
|
||||
// All the items loaded
|
||||
assertEquals("We have all the items via GameData",371,Item.REGISTRY.getKeys().size());
|
||||
assertEquals("We have all the items via GameData",391,Item.REGISTRY.getKeys().size());
|
||||
|
||||
// Our lookups find the same stuff vanilla sees
|
||||
final IForgeRegistry<Block> blocks = PersistentRegistryManager.findRegistry(Blocks.AIR);
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.enchantment.EnumEnchantmentType;
|
||||
import net.minecraft.init.Bootstrap;
|
||||
import net.minecraftforge.client.EnumHelperClient;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
@@ -85,7 +86,13 @@ public class EnumHelperTest
|
||||
|
||||
for (Constructor<?> declaredConstructor : declaredConstructors)
|
||||
{
|
||||
seenCtrs.add(declaredConstructor);
|
||||
boolean filter = declaredConstructor.isSynthetic();
|
||||
|
||||
if (returnType == EnumEnchantmentType.class && declaredConstructor.getParameterTypes().length == 2)
|
||||
filter = true; //We don't want people using this method.
|
||||
|
||||
if (!filter)
|
||||
seenCtrs.add(declaredConstructor);
|
||||
//System.out.println(" " + declaredConstructor.toString());
|
||||
|
||||
Class<?>[] expectedParameters = declaredConstructor.getParameterTypes();
|
||||
@@ -141,4 +148,4 @@ public class EnumHelperTest
|
||||
// This works, it's been tested, find a way to make this a unit test...
|
||||
//Assert.assertEquals(BiomeDictionary.Type.getType("NEWTYPE"), BiomeDictionary.Type.getType("NEWTYPE"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user