summaryrefslogtreecommitdiff
path: root/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
diff options
context:
space:
mode:
authorGravatar gegy10002019-06-18 20:20:40 +0200
committerGravatar gegy10002019-06-18 20:20:40 +0200
commit42243fa65e1d87f6a0498f6e2d83505605409411 (patch)
treec4127d7928c752360639b42b221c96678cdc5807 /src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
parentPlugin rework along with API rework: Enigma split from EnigmaProject; plugins... (diff)
parentfix unwanted declaration navigation during Quick Find (diff)
downloadenigma-fork-42243fa65e1d87f6a0498f6e2d83505605409411.tar.gz
enigma-fork-42243fa65e1d87f6a0498f6e2d83505605409411.tar.xz
enigma-fork-42243fa65e1d87f6a0498f6e2d83505605409411.zip
Mostly resolve test failures
Diffstat (limited to 'src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java')
-rw-r--r--src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java b/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
index 0712ccf..48975c8 100644
--- a/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
+++ b/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java
@@ -11,6 +11,7 @@
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.index.JarIndex; 16import cuchaz.enigma.analysis.index.JarIndex;
16import cuchaz.enigma.translation.representation.entry.ClassEntry; 17import cuchaz.enigma.translation.representation.entry.ClassEntry;
@@ -18,9 +19,8 @@ import cuchaz.enigma.translation.representation.entry.MethodDefEntry;
18import cuchaz.enigma.translation.representation.entry.MethodEntry; 19import cuchaz.enigma.translation.representation.entry.MethodEntry;
19import org.junit.Test; 20import org.junit.Test;
20 21
21import java.io.File; 22import java.nio.file.Paths;
22import java.util.Collection; 23import java.util.Collection;
23import java.util.jar.JarFile;
24 24
25import static cuchaz.enigma.TestEntryFactory.*; 25import static cuchaz.enigma.TestEntryFactory.*;
26import static org.hamcrest.MatcherAssert.assertThat; 26import static org.hamcrest.MatcherAssert.assertThat;
@@ -36,11 +36,9 @@ public class TestJarIndexConstructorReferences {
36 private ClassEntry defaultClass = newClass("c"); 36 private ClassEntry defaultClass = newClass("c");
37 private ClassEntry callerClass = newClass("b"); 37 private ClassEntry callerClass = newClass("b");
38 38
39 public TestJarIndexConstructorReferences() 39 public TestJarIndexConstructorReferences() throws Exception {
40 throws Exception { 40 ClassCache classCache = ClassCache.of(Paths.get("build/test-obf/constructors.jar"));
41 File jarFile = new File("build/test-obf/constructors.jar"); 41 index = classCache.index(ProgressListener.none());
42 index = JarIndex.empty();
43 index.indexJar(new ParsedJar(new JarFile(jarFile)), s -> {});
44 } 42 }
45 43
46 @Test 44 @Test