diff options
Diffstat (limited to 'src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java')
| -rw-r--r-- | src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java b/src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java index 1299bcc..103c366 100644 --- a/src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java +++ b/src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java | |||
| @@ -23,9 +23,9 @@ import cuchaz.enigma.translation.representation.entry.MethodDefEntry; | |||
| 23 | import cuchaz.enigma.translation.representation.entry.MethodEntry; | 23 | import cuchaz.enigma.translation.representation.entry.MethodEntry; |
| 24 | import org.junit.Test; | 24 | import org.junit.Test; |
| 25 | 25 | ||
| 26 | import java.nio.file.Paths; | ||
| 26 | import java.util.Collection; | 27 | import java.util.Collection; |
| 27 | import java.util.List; | 28 | import java.util.List; |
| 28 | import java.util.jar.JarFile; | ||
| 29 | 29 | ||
| 30 | import static cuchaz.enigma.TestEntryFactory.*; | 30 | import static cuchaz.enigma.TestEntryFactory.*; |
| 31 | import static org.hamcrest.MatcherAssert.assertThat; | 31 | import static org.hamcrest.MatcherAssert.assertThat; |
| @@ -35,10 +35,9 @@ public class TestJarIndexLoneClass { | |||
| 35 | 35 | ||
| 36 | private JarIndex index; | 36 | private JarIndex index; |
| 37 | 37 | ||
| 38 | public TestJarIndexLoneClass() | 38 | public TestJarIndexLoneClass() throws Exception { |
| 39 | throws Exception { | 39 | ClassCache classCache = ClassCache.of(Paths.get("build/test-obf/loneClass.jar")); |
| 40 | index = JarIndex.empty(); | 40 | index = classCache.index(ProgressListener.none()); |
| 41 | index.indexJar(new ParsedJar(new JarFile("build/test-obf/loneClass.jar")), s -> {}); | ||
| 42 | } | 41 | } |
| 43 | 42 | ||
| 44 | @Test | 43 | @Test |