summaryrefslogtreecommitdiff
path: root/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java')
-rw-r--r--src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java b/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
index c3f3b66..48975c8 100644
--- a/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
+++ b/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
@@ -11,17 +11,16 @@
11 11
12package cuchaz.enigma; 12package cuchaz.enigma;
13 13
14import cuchaz.enigma.analysis.ClassCache;
14import cuchaz.enigma.analysis.EntryReference; 15import cuchaz.enigma.analysis.EntryReference;
15import cuchaz.enigma.analysis.ParsedJar;
16import cuchaz.enigma.analysis.index.JarIndex; 16import cuchaz.enigma.analysis.index.JarIndex;
17import cuchaz.enigma.translation.representation.entry.ClassEntry; 17import cuchaz.enigma.translation.representation.entry.ClassEntry;
18import cuchaz.enigma.translation.representation.entry.MethodDefEntry; 18import cuchaz.enigma.translation.representation.entry.MethodDefEntry;
19import cuchaz.enigma.translation.representation.entry.MethodEntry; 19import cuchaz.enigma.translation.representation.entry.MethodEntry;
20import org.junit.Test; 20import org.junit.Test;
21 21
22import java.io.File; 22import java.nio.file.Paths;
23import java.util.Collection; 23import java.util.Collection;
24import java.util.jar.JarFile;
25 24
26import static cuchaz.enigma.TestEntryFactory.*; 25import static cuchaz.enigma.TestEntryFactory.*;
27import static org.hamcrest.MatcherAssert.assertThat; 26import static org.hamcrest.MatcherAssert.assertThat;
@@ -37,11 +36,9 @@ public class TestJarIndexConstructorReferences {
37 private ClassEntry defaultClass = newClass("c"); 36 private ClassEntry defaultClass = newClass("c");
38 private ClassEntry callerClass = newClass("b"); 37 private ClassEntry callerClass = newClass("b");
39 38
40 public TestJarIndexConstructorReferences() 39 public TestJarIndexConstructorReferences() throws Exception {
41 throws Exception { 40 ClassCache classCache = ClassCache.of(Paths.get("build/test-obf/constructors.jar"));
42 File jarFile = new File("build/test-obf/constructors.jar"); 41 index = classCache.index(ProgressListener.none());
43 index = JarIndex.empty();
44 index.indexJar(new ParsedJar(new JarFile(jarFile)), s -> {});
45 } 42 }
46 43
47 @Test 44 @Test