diff options
| author | 2019-06-18 20:20:40 +0200 | |
|---|---|---|
| committer | 2019-06-18 20:20:40 +0200 | |
| commit | 42243fa65e1d87f6a0498f6e2d83505605409411 (patch) | |
| tree | c4127d7928c752360639b42b221c96678cdc5807 /src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java | |
| parent | Plugin rework along with API rework: Enigma split from EnigmaProject; plugins... (diff) | |
| parent | fix unwanted declaration navigation during Quick Find (diff) | |
| download | enigma-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.java | 12 |
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 | ||
| 12 | package cuchaz.enigma; | 12 | package cuchaz.enigma; |
| 13 | 13 | ||
| 14 | import cuchaz.enigma.analysis.ClassCache; | ||
| 14 | import cuchaz.enigma.analysis.EntryReference; | 15 | import cuchaz.enigma.analysis.EntryReference; |
| 15 | import cuchaz.enigma.analysis.index.JarIndex; | 16 | import cuchaz.enigma.analysis.index.JarIndex; |
| 16 | import cuchaz.enigma.translation.representation.entry.ClassEntry; | 17 | import cuchaz.enigma.translation.representation.entry.ClassEntry; |
| @@ -18,9 +19,8 @@ import cuchaz.enigma.translation.representation.entry.MethodDefEntry; | |||
| 18 | import cuchaz.enigma.translation.representation.entry.MethodEntry; | 19 | import cuchaz.enigma.translation.representation.entry.MethodEntry; |
| 19 | import org.junit.Test; | 20 | import org.junit.Test; |
| 20 | 21 | ||
| 21 | import java.io.File; | 22 | import java.nio.file.Paths; |
| 22 | import java.util.Collection; | 23 | import java.util.Collection; |
| 23 | import java.util.jar.JarFile; | ||
| 24 | 24 | ||
| 25 | import static cuchaz.enigma.TestEntryFactory.*; | 25 | import static cuchaz.enigma.TestEntryFactory.*; |
| 26 | import static org.hamcrest.MatcherAssert.assertThat; | 26 | import 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 |