Permalink
Browse files

Fixes #2729: Fix transformer regression introduced during FG downtime. (

#2730)

Added a unittest to verify the necessary string returns match the actual
existing classes, in case something screws up the refactoring.
1 parent ab89278 commit c720584e498e8de66f3419eb2c2c6ca67366c28a @yueh yueh committed on GitHub Dec 31, 2016
@@ -64,7 +64,7 @@ public void load( final FMLInitializationEvent event )
@Override
public String[] getASMTransformerClass()
{
- return new String[] { "appeng.coremod.asm.ASMIntegration" };
+ return new String[] { "appeng.coremod.transformer.ASMIntegration" };
}
@Override
@@ -1,3 +1,20 @@
+/*
+ * This file is part of Applied Energistics 2.
+ * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
+ *
+ * Applied Energistics 2 is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Applied Energistics 2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
+ */
package appeng.client.render;
@@ -35,7 +52,8 @@
@EventHandler
public void preInit( FMLPreInitializationEvent event )
{
- GameRegistry.register( uvlblock = new Block( Material.IRON ){
+ GameRegistry.register( uvlblock = new Block( Material.IRON )
+ {
final AxisAlignedBB box = new AxisAlignedBB( 0.25, 0, 7 / 16d, 0.75, 1, 9 / 16d );
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Applied Energistics 2.
+ * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
+ *
+ * Applied Energistics 2 is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Applied Energistics 2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
+ */
+
+package appeng.coremod;
+
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+public class AppEngCoreTest
+{
+ private final static String EXPECTED_CONTAINER_CLASS_NAME = appeng.coremod.AppEngCore.class.getName();
+ private final static String EXPECTED_CONTAINER_MOD_ID = "appliedenergistics2-core";
+ private final static String[] EXPECTED_TRANSFORMERS = new String[] {
+ appeng.coremod.transformer.ASMIntegration.class.getName()
+ };
+
+ private AppEngCore coreModContainer = new AppEngCore();
+
+ @Test
+ public void testTransformerStringsMatchActualClasses()
+ {
+ assertArrayEquals( EXPECTED_TRANSFORMERS, coreModContainer.getASMTransformerClass() );
+ }
+
+ @Test
+ public void testContainerClassExists()
+ {
+ assertEquals( EXPECTED_CONTAINER_CLASS_NAME, coreModContainer.getModContainerClass() );
+ }
+
+ @Test
+ public void testContainerModId()
+ {
+ assertEquals( EXPECTED_CONTAINER_MOD_ID, coreModContainer.getModId() );
+ }
+
+}
@@ -1,3 +1,20 @@
+/*
+ * This file is part of Applied Energistics 2.
+ * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
+ *
+ * Applied Energistics 2 is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Applied Energistics 2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
+ */
package appeng.services.version;
@@ -7,6 +7,24 @@
import org.junit.Test;
+/*
+ * This file is part of Applied Energistics 2.
+ * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
+ *
+ * Applied Energistics 2 is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Applied Energistics 2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
+ */
+
/**
* Test for {@link ISlimReadableNumberConverter}
*
@@ -1,3 +1,20 @@
+/*
+ * This file is part of Applied Energistics 2.
+ * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
+ *
+ * Applied Energistics 2 is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Applied Energistics 2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
+ */
package appeng.util;

0 comments on commit c720584

Please sign in to comment.