diff options
| author | 2020-03-09 06:04:08 -0400 | |
|---|---|---|
| committer | 2020-03-09 10:04:08 +0000 | |
| commit | 58c0aeb15a65324de08a914dfa62cc68a516a4e3 (patch) | |
| tree | f45e8141c0864692051149a478c5a0a6bbe68686 /src/test/java/cuchaz/enigma/TestDeobfed.java | |
| parent | Made Enigma gui translatable (#193) (diff) | |
| download | enigma-fork-58c0aeb15a65324de08a914dfa62cc68a516a4e3.tar.gz enigma-fork-58c0aeb15a65324de08a914dfa62cc68a516a4e3.tar.xz enigma-fork-58c0aeb15a65324de08a914dfa62cc68a516a4e3.zip | |
CFR support (#192)
* Add decompiler API
* Add CFR support
Diffstat (limited to 'src/test/java/cuchaz/enigma/TestDeobfed.java')
| -rw-r--r-- | src/test/java/cuchaz/enigma/TestDeobfed.java | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/test/java/cuchaz/enigma/TestDeobfed.java b/src/test/java/cuchaz/enigma/TestDeobfed.java index 3ee86cb..c88b0eb 100644 --- a/src/test/java/cuchaz/enigma/TestDeobfed.java +++ b/src/test/java/cuchaz/enigma/TestDeobfed.java | |||
| @@ -13,6 +13,9 @@ package cuchaz.enigma; | |||
| 13 | 13 | ||
| 14 | import cuchaz.enigma.analysis.ClassCache; | 14 | import cuchaz.enigma.analysis.ClassCache; |
| 15 | import cuchaz.enigma.analysis.index.JarIndex; | 15 | import cuchaz.enigma.analysis.index.JarIndex; |
| 16 | import cuchaz.enigma.source.Decompiler; | ||
| 17 | import cuchaz.enigma.source.Decompilers; | ||
| 18 | import cuchaz.enigma.source.SourceSettings; | ||
| 16 | import org.junit.BeforeClass; | 19 | import org.junit.BeforeClass; |
| 17 | import org.junit.Test; | 20 | import org.junit.Test; |
| 18 | 21 | ||
| @@ -68,31 +71,29 @@ public class TestDeobfed { | |||
| 68 | @Test | 71 | @Test |
| 69 | public void decompile() { | 72 | public void decompile() { |
| 70 | EnigmaProject project = new EnigmaProject(enigma, classCache, index); | 73 | EnigmaProject project = new EnigmaProject(enigma, classCache, index); |
| 74 | Decompiler decompiler = Decompilers.PROCYON.create(project.getClassCache(), new SourceSettings(false, false)); | ||
| 71 | 75 | ||
| 72 | CompiledSourceTypeLoader typeLoader = new CompiledSourceTypeLoader(project.getClassCache()); | 76 | decompiler.getSource("a"); |
| 73 | SourceProvider sourceProvider = new SourceProvider(SourceProvider.createSettings(), typeLoader); | 77 | decompiler.getSource("b"); |
| 74 | 78 | decompiler.getSource("c"); | |
| 75 | sourceProvider.getSources("a"); | 79 | decompiler.getSource("d"); |
| 76 | sourceProvider.getSources("b"); | 80 | decompiler.getSource("d$1"); |
| 77 | sourceProvider.getSources("c"); | 81 | decompiler.getSource("e"); |
| 78 | sourceProvider.getSources("d"); | 82 | decompiler.getSource("f"); |
| 79 | sourceProvider.getSources("d$1"); | 83 | decompiler.getSource("g"); |
| 80 | sourceProvider.getSources("e"); | 84 | decompiler.getSource("g$a"); |
| 81 | sourceProvider.getSources("f"); | 85 | decompiler.getSource("g$a$a"); |
| 82 | sourceProvider.getSources("g"); | 86 | decompiler.getSource("g$b"); |
| 83 | sourceProvider.getSources("g$a"); | 87 | decompiler.getSource("g$b$a"); |
| 84 | sourceProvider.getSources("g$a$a"); | 88 | decompiler.getSource("h"); |
| 85 | sourceProvider.getSources("g$b"); | 89 | decompiler.getSource("h$a"); |
| 86 | sourceProvider.getSources("g$b$a"); | 90 | decompiler.getSource("h$a$a"); |
| 87 | sourceProvider.getSources("h"); | 91 | decompiler.getSource("h$b"); |
| 88 | sourceProvider.getSources("h$a"); | 92 | decompiler.getSource("h$b$a"); |
| 89 | sourceProvider.getSources("h$a$a"); | 93 | decompiler.getSource("h$b$a$a"); |
| 90 | sourceProvider.getSources("h$b"); | 94 | decompiler.getSource("h$b$a$b"); |
| 91 | sourceProvider.getSources("h$b$a"); | 95 | decompiler.getSource("i"); |
| 92 | sourceProvider.getSources("h$b$a$a"); | 96 | decompiler.getSource("i$a"); |
| 93 | sourceProvider.getSources("h$b$a$b"); | 97 | decompiler.getSource("i$b"); |
| 94 | sourceProvider.getSources("i"); | ||
| 95 | sourceProvider.getSources("i$a"); | ||
| 96 | sourceProvider.getSources("i$b"); | ||
| 97 | } | 98 | } |
| 98 | } | 99 | } |