diff options
| author | 2020-10-02 15:44:37 +0200 | |
|---|---|---|
| committer | 2020-10-02 15:44:37 +0200 | |
| commit | 0b31b58b7950cfef3c957190ae2038614b5bf79d (patch) | |
| tree | b1419ed32316efd16088051804108a28d4dff8f7 /enigma/src | |
| parent | Focus editor after rename (diff) | |
| download | enigma-fork-0b31b58b7950cfef3c957190ae2038614b5bf79d.tar.gz enigma-fork-0b31b58b7950cfef3c957190ae2038614b5bf79d.tar.xz enigma-fork-0b31b58b7950cfef3c957190ae2038614b5bf79d.zip | |
Fix build issues
Diffstat (limited to 'enigma/src')
| -rw-r--r-- | enigma/src/test/java/cuchaz/enigma/TestAllowableClashes.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/enigma/src/test/java/cuchaz/enigma/TestAllowableClashes.java b/enigma/src/test/java/cuchaz/enigma/TestAllowableClashes.java index bfc21de..ce82e38 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestAllowableClashes.java +++ b/enigma/src/test/java/cuchaz/enigma/TestAllowableClashes.java | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | package cuchaz.enigma; | 1 | package cuchaz.enigma; |
| 2 | 2 | ||
| 3 | import java.io.IOException; | ||
| 4 | import java.nio.file.Paths; | ||
| 5 | |||
| 6 | import org.hamcrest.MatcherAssert; | ||
| 7 | import org.junit.Assert; | ||
| 8 | import org.junit.Test; | ||
| 9 | |||
| 3 | import cuchaz.enigma.classprovider.ClasspathClassProvider; | 10 | import cuchaz.enigma.classprovider.ClasspathClassProvider; |
| 4 | import cuchaz.enigma.translation.mapping.EntryMapping; | 11 | import cuchaz.enigma.translation.mapping.EntryMapping; |
| 5 | import cuchaz.enigma.translation.mapping.EntryRemapper; | 12 | import cuchaz.enigma.translation.mapping.EntryRemapper; |
| @@ -9,26 +16,18 @@ import cuchaz.enigma.translation.mapping.tree.EntryTree; | |||
| 9 | import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; | 16 | import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; |
| 10 | import cuchaz.enigma.translation.representation.entry.MethodEntry; | 17 | import cuchaz.enigma.translation.representation.entry.MethodEntry; |
| 11 | import cuchaz.enigma.utils.validation.ValidationContext; | 18 | import cuchaz.enigma.utils.validation.ValidationContext; |
| 12 | import org.hamcrest.MatcherAssert; | ||
| 13 | import org.junit.Assert; | ||
| 14 | import org.junit.Test; | ||
| 15 | |||
| 16 | import java.io.IOException; | ||
| 17 | import java.nio.file.Paths; | ||
| 18 | 19 | ||
| 19 | /** | 20 | /** |
| 20 | * Test that we can accept some name clashes that are allowed by javac | 21 | * Test that we can accept some name clashes that are allowed by javac |
| 21 | */ | 22 | */ |
| 22 | public class TestAllowableClashes { | 23 | public class TestAllowableClashes { |
| 23 | 24 | ||
| 24 | private static final String inputBaseName = "build/test-obf/visibility"; | ||
| 25 | |||
| 26 | @Test | 25 | @Test |
| 27 | public void test() throws IOException, MappingParseException { | 26 | public void test() throws IOException, MappingParseException { |
| 28 | //Load produced mappings | 27 | //Load produced mappings |
| 29 | Enigma enigma = Enigma.create(); | 28 | Enigma enigma = Enigma.create(); |
| 30 | EnigmaProject project = enigma.openJar(Paths.get(inputBaseName + ".jar"), new ClasspathClassProvider(), ProgressListener.none()); | 29 | EnigmaProject project = enigma.openJar(Paths.get("build/test-obf/visibility.jar"), new ClasspathClassProvider(), ProgressListener.none()); |
| 31 | EntryTree<EntryMapping> obfToDeobf = MappingFormat.PROGUARD.read(Paths.get(inputBaseName + "-mapping.txt"), ProgressListener.none(), null); | 30 | EntryTree<EntryMapping> obfToDeobf = MappingFormat.PROGUARD.read(Paths.get("build/visibility-mapping.txt"), ProgressListener.none(), null); |
| 32 | 31 | ||
| 33 | //Load them into enigma, none should conflict | 32 | //Load them into enigma, none should conflict |
| 34 | EntryRemapper mapper = project.getMapper(); | 33 | EntryRemapper mapper = project.getMapper(); |