summaryrefslogtreecommitdiff
path: root/src/test/java/cuchaz/enigma/TestDeobfed.java
diff options
context:
space:
mode:
authorGravatar Thog2017-03-08 08:17:04 +0100
committerGravatar Thog2017-03-08 08:17:04 +0100
commit6e464ea251cab63c776ece0b2a356f1498ffa294 (patch)
tree5ed30c03f5ac4cd2d6877874f5ede576049954f7 /src/test/java/cuchaz/enigma/TestDeobfed.java
parentDrop unix case style and implement hashCode when equals is overrided (diff)
downloadenigma-fork-6e464ea251cab63c776ece0b2a356f1498ffa294.tar.gz
enigma-fork-6e464ea251cab63c776ece0b2a356f1498ffa294.tar.xz
enigma-fork-6e464ea251cab63c776ece0b2a356f1498ffa294.zip
Follow Fabric guidelines
Diffstat (limited to 'src/test/java/cuchaz/enigma/TestDeobfed.java')
-rw-r--r--src/test/java/cuchaz/enigma/TestDeobfed.java28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/test/java/cuchaz/enigma/TestDeobfed.java b/src/test/java/cuchaz/enigma/TestDeobfed.java
index 76a3d3b..e6c1b74 100644
--- a/src/test/java/cuchaz/enigma/TestDeobfed.java
+++ b/src/test/java/cuchaz/enigma/TestDeobfed.java
@@ -4,38 +4,36 @@
4 * are made available under the terms of the GNU Lesser General Public 4 * are made available under the terms of the GNU Lesser General Public
5 * License v3.0 which accompanies this distribution, and is available at 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11package cuchaz.enigma;
12
13
14import static cuchaz.enigma.TestEntryFactory.*;
15import static org.hamcrest.MatcherAssert.*;
16import static org.hamcrest.Matchers.*;
17 11
18import java.util.jar.JarFile; 12package cuchaz.enigma;
19 13
14import cuchaz.enigma.analysis.JarIndex;
20import org.junit.BeforeClass; 15import org.junit.BeforeClass;
21import org.junit.Test; 16import org.junit.Test;
22 17
23import cuchaz.enigma.analysis.JarIndex; 18import java.util.jar.JarFile;
24 19
20import static cuchaz.enigma.TestEntryFactory.newClass;
21import static org.hamcrest.MatcherAssert.assertThat;
22import static org.hamcrest.Matchers.containsInAnyOrder;
25 23
26public class TestDeobfed { 24public class TestDeobfed {
27 25
28 private static JarFile jar; 26 private static JarFile jar;
29 private static JarIndex index; 27 private static JarIndex index;
30 28
31 @BeforeClass 29 @BeforeClass
32 public static void beforeClass() 30 public static void beforeClass()
33 throws Exception { 31 throws Exception {
34 jar = new JarFile("build/test-deobf/translation.jar"); 32 jar = new JarFile("build/test-deobf/translation.jar");
35 index = new JarIndex(); 33 index = new JarIndex();
36 index.indexJar(jar, true); 34 index.indexJar(jar, true);
37 } 35 }
38 36
39 @Test 37 @Test
40 public void obfEntries() { 38 public void obfEntries() {
41 assertThat(index.getObfClassEntries(), containsInAnyOrder( 39 assertThat(index.getObfClassEntries(), containsInAnyOrder(
@@ -64,10 +62,10 @@ public class TestDeobfed {
64 newClass("i$b") 62 newClass("i$b")
65 )); 63 ));
66 } 64 }
67 65
68 @Test 66 @Test
69 public void decompile() 67 public void decompile()
70 throws Exception { 68 throws Exception {
71 Deobfuscator deobfuscator = new Deobfuscator(jar); 69 Deobfuscator deobfuscator = new Deobfuscator(jar);
72 deobfuscator.getSourceTree("a"); 70 deobfuscator.getSourceTree("a");
73 deobfuscator.getSourceTree("b"); 71 deobfuscator.getSourceTree("b");