diff options
| author | 2019-01-24 14:48:32 +0200 | |
|---|---|---|
| committer | 2019-01-24 13:48:32 +0100 | |
| commit | 00fcd0550fcdda621c2e4662f6ddd55ce673b931 (patch) | |
| tree | 6f9e4c24dbcc6d118fceec56adf7bf9d747a485c /src/test/java/cuchaz/enigma/TestTranslator.java | |
| parent | mark as 0.13.0-SNAPSHOT for preliminary development (diff) | |
| download | enigma-fork-00fcd0550fcdda621c2e4662f6ddd55ce673b931.tar.gz enigma-fork-00fcd0550fcdda621c2e4662f6ddd55ce673b931.tar.xz enigma-fork-00fcd0550fcdda621c2e4662f6ddd55ce673b931.zip | |
[WIP] Mapping rework (#91)
* Move packages
* Mapping & entry refactor: first pass
* Fix deobf -> obf tree remapping
* Resolve various issues
* Give all entries the potential for parents and treat inner classes as children
* Deobf UI tree elements
* Tests pass
* Sort mapping output
* Fix delta tracking
* Index separation and first pass for #97
* Keep track of remapped jar index
* Fix child entries not being remapped
* Drop non-root entries
* Track dropped mappings
* Fix enigma mapping ordering
* EntryTreeNode interface
* Small tweaks
* Naive full index remap on rename
* Entries can resolve to more than one root entry
* Support alternative resolution strategies
* Bridge method resolution
* Tests pass
* Fix mappings being used where there are none
* Fix methods with different descriptors being considered unique. closes #89
Diffstat (limited to 'src/test/java/cuchaz/enigma/TestTranslator.java')
| -rw-r--r-- | src/test/java/cuchaz/enigma/TestTranslator.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/test/java/cuchaz/enigma/TestTranslator.java b/src/test/java/cuchaz/enigma/TestTranslator.java index 9b6eb91..b978129 100644 --- a/src/test/java/cuchaz/enigma/TestTranslator.java +++ b/src/test/java/cuchaz/enigma/TestTranslator.java | |||
| @@ -11,23 +11,14 @@ | |||
| 11 | 11 | ||
| 12 | package cuchaz.enigma; | 12 | package cuchaz.enigma; |
| 13 | 13 | ||
| 14 | import cuchaz.enigma.mapping.entry.Entry; | 14 | import cuchaz.enigma.translation.representation.entry.Entry; |
| 15 | import cuchaz.enigma.mapping.Mappings; | ||
| 16 | import cuchaz.enigma.mapping.Translator; | ||
| 17 | import org.junit.BeforeClass; | 15 | import org.junit.BeforeClass; |
| 18 | import org.junit.Test; | 16 | import org.junit.Test; |
| 19 | 17 | ||
| 20 | import static cuchaz.enigma.TestEntryFactory.newClass; | 18 | import static cuchaz.enigma.TestEntryFactory.*; |
| 21 | import static cuchaz.enigma.TestEntryFactory.newField; | ||
| 22 | import static cuchaz.enigma.TestEntryFactory.newMethod; | ||
| 23 | 19 | ||
| 24 | public class TestTranslator { | 20 | public class TestTranslator { |
| 25 | 21 | ||
| 26 | private static Deobfuscator deobfuscator; | ||
| 27 | private static Mappings mappings; | ||
| 28 | private static Translator deobfTranslator; | ||
| 29 | private static Translator obfTranslator; | ||
| 30 | |||
| 31 | @BeforeClass | 22 | @BeforeClass |
| 32 | public static void beforeClass() | 23 | public static void beforeClass() |
| 33 | throws Exception { | 24 | throws Exception { |
| @@ -147,7 +138,7 @@ public class TestTranslator { | |||
| 147 | assertMapping(newMethod("i$b", "a", "()Ljava/lang/Object;"), newMethod("deobf/I_Generics$B_Generic", "m1", "()Ljava/lang/Object;")); | 138 | assertMapping(newMethod("i$b", "a", "()Ljava/lang/Object;"), newMethod("deobf/I_Generics$B_Generic", "m1", "()Ljava/lang/Object;")); |
| 148 | } | 139 | } |
| 149 | 140 | ||
| 150 | private void assertMapping(Entry obf, Entry deobf) { | 141 | private void assertMapping(Entry<?> obf, Entry<?> deobf) { |
| 151 | //assertThat(deobfTranslator.translateEntry(obf), is(deobf)); | 142 | //assertThat(deobfTranslator.translateEntry(obf), is(deobf)); |
| 152 | //assertThat(obfTranslator.translateEntry(deobf), is(obf)); | 143 | //assertThat(obfTranslator.translateEntry(deobf), is(obf)); |
| 153 | 144 | ||