diff options
| author | 2015-02-02 21:26:10 -0500 | |
|---|---|---|
| committer | 2015-02-02 21:26:10 -0500 | |
| commit | 448685653e90415ebe10b08e8335462b81c30421 (patch) | |
| tree | 474d9bcc08c2b5441b704595992d3beff1d2587f /test/cuchaz/enigma/TestTokensConstructors.java | |
| parent | avoid concurrent modification exception (diff) | |
| download | enigma-fork-448685653e90415ebe10b08e8335462b81c30421.tar.gz enigma-fork-448685653e90415ebe10b08e8335462b81c30421.tar.xz enigma-fork-448685653e90415ebe10b08e8335462b81c30421.zip | |
fix issue with bridge methods
Diffstat (limited to 'test/cuchaz/enigma/TestTokensConstructors.java')
| -rw-r--r-- | test/cuchaz/enigma/TestTokensConstructors.java | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/test/cuchaz/enigma/TestTokensConstructors.java b/test/cuchaz/enigma/TestTokensConstructors.java index 9f85e81..56424ae 100644 --- a/test/cuchaz/enigma/TestTokensConstructors.java +++ b/test/cuchaz/enigma/TestTokensConstructors.java | |||
| @@ -10,15 +10,11 @@ | |||
| 10 | ******************************************************************************/ | 10 | ******************************************************************************/ |
| 11 | package cuchaz.enigma; | 11 | package cuchaz.enigma; |
| 12 | 12 | ||
| 13 | import static cuchaz.enigma.EntryFactory.newBehaviorReferenceByConstructor; | 13 | import static cuchaz.enigma.EntryFactory.*; |
| 14 | import static cuchaz.enigma.EntryFactory.newBehaviorReferenceByMethod; | 14 | import static org.hamcrest.MatcherAssert.*; |
| 15 | import static cuchaz.enigma.EntryFactory.newConstructor; | 15 | import static org.hamcrest.Matchers.*; |
| 16 | import static org.hamcrest.MatcherAssert.assertThat; | ||
| 17 | import static org.hamcrest.Matchers.containsInAnyOrder; | ||
| 18 | import static org.hamcrest.Matchers.is; | ||
| 19 | import static org.hamcrest.Matchers.nullValue; | ||
| 20 | 16 | ||
| 21 | import java.io.File; | 17 | import java.util.jar.JarFile; |
| 22 | 18 | ||
| 23 | import org.junit.Test; | 19 | import org.junit.Test; |
| 24 | 20 | ||
| @@ -27,7 +23,7 @@ import cuchaz.enigma.mapping.BehaviorEntry; | |||
| 27 | public class TestTokensConstructors extends TokenChecker { | 23 | public class TestTokensConstructors extends TokenChecker { |
| 28 | 24 | ||
| 29 | public TestTokensConstructors() throws Exception { | 25 | public TestTokensConstructors() throws Exception { |
| 30 | super(new File("build/testConstructors.obf.jar")); | 26 | super(new JarFile("build/testConstructors.obf.jar")); |
| 31 | } | 27 | } |
| 32 | 28 | ||
| 33 | @Test | 29 | @Test |
| @@ -63,11 +59,11 @@ public class TestTokensConstructors extends TokenChecker { | |||
| 63 | ); | 59 | ); |
| 64 | assertThat( | 60 | assertThat( |
| 65 | getReferenceTokens(newBehaviorReferenceByConstructor(source, "none/d", "()V")), | 61 | getReferenceTokens(newBehaviorReferenceByConstructor(source, "none/d", "()V")), |
| 66 | containsInAnyOrder("super") // implicit call, decompiled to "super" | 62 | is(empty()) // implicit call, not decompiled to token |
| 67 | ); | 63 | ); |
| 68 | assertThat( | 64 | assertThat( |
| 69 | getReferenceTokens(newBehaviorReferenceByConstructor(source, "none/d", "(III)V")), | 65 | getReferenceTokens(newBehaviorReferenceByConstructor(source, "none/d", "(III)V")), |
| 70 | containsInAnyOrder("super") // implicit call, decompiled to "super" | 66 | is(empty()) // implicit call, not decompiled to token |
| 71 | ); | 67 | ); |
| 72 | } | 68 | } |
| 73 | 69 | ||