diff options
| author | 2014-09-24 01:00:54 -0400 | |
|---|---|---|
| committer | 2014-09-24 01:00:54 -0400 | |
| commit | 8776a8ba38123c822530e5f659c626c8db616217 (patch) | |
| tree | 8138a4e4447552e598bb99cfd8fb23a5f27f840b /test/cuchaz/enigma/TestJarIndexInheritanceTree.java | |
| parent | trying to figure out why some mappings to correspond to anything in the jar f... (diff) | |
| download | enigma-fork-8776a8ba38123c822530e5f659c626c8db616217.tar.gz enigma-fork-8776a8ba38123c822530e5f659c626c8db616217.tar.xz enigma-fork-8776a8ba38123c822530e5f659c626c8db616217.zip | |
HOW DO I WRITE SO MANY BUGS?!?
Diffstat (limited to 'test/cuchaz/enigma/TestJarIndexInheritanceTree.java')
| -rw-r--r-- | test/cuchaz/enigma/TestJarIndexInheritanceTree.java | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/test/cuchaz/enigma/TestJarIndexInheritanceTree.java b/test/cuchaz/enigma/TestJarIndexInheritanceTree.java index 317a6bc..50c2282 100644 --- a/test/cuchaz/enigma/TestJarIndexInheritanceTree.java +++ b/test/cuchaz/enigma/TestJarIndexInheritanceTree.java | |||
| @@ -100,28 +100,6 @@ public class TestJarIndexInheritanceTree | |||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | @Test | 102 | @Test |
| 103 | public void isImplemented( ) | ||
| 104 | { | ||
| 105 | // getName() | ||
| 106 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_baseClass, "a", "()Ljava/lang/String;" ) ), is( true ) ); | ||
| 107 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassA, "a", "()Ljava/lang/String;" ) ), is( false ) ); | ||
| 108 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassAA, "a", "()Ljava/lang/String;" ) ), is( true ) ); | ||
| 109 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassB, "a", "()Ljava/lang/String;" ) ), is( false ) ); | ||
| 110 | |||
| 111 | // doBaseThings() | ||
| 112 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_baseClass, "a", "()V" ) ), is( true ) ); | ||
| 113 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassA, "a", "()V" ) ), is( false ) ); | ||
| 114 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassAA, "a", "()V" ) ), is( true ) ); | ||
| 115 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassB, "a", "()V" ) ), is( true ) ); | ||
| 116 | |||
| 117 | // doBThings() | ||
| 118 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_baseClass, "b", "()V" ) ), is( false ) ); | ||
| 119 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassA, "b", "()V" ) ), is( false ) ); | ||
| 120 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassAA, "b", "()V" ) ), is( false ) ); | ||
| 121 | assertThat( m_index.isMethodImplemented( new MethodEntry( m_subClassB, "b", "()V" ) ), is( true ) ); | ||
| 122 | } | ||
| 123 | |||
| 124 | @Test | ||
| 125 | public void relatedMethodImplementations( ) | 103 | public void relatedMethodImplementations( ) |
| 126 | { | 104 | { |
| 127 | Set<MethodEntry> entries; | 105 | Set<MethodEntry> entries; |
| @@ -238,11 +216,23 @@ public class TestJarIndexInheritanceTree | |||
| 238 | assertThat( m_index.containsObfField( m_numThingsField ), is( true ) ); | 216 | assertThat( m_index.containsObfField( m_numThingsField ), is( true ) ); |
| 239 | 217 | ||
| 240 | // methods | 218 | // methods |
| 241 | assertThat( m_index.containsObfMethod( new MethodEntry( m_baseClass, "a", "()Ljava/lang/String;" ) ), is( true ) ); | 219 | // getName() |
| 242 | assertThat( m_index.containsObfMethod( new MethodEntry( m_baseClass, "a", "()V" ) ), is( true ) ); | 220 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_baseClass, "a", "()Ljava/lang/String;" ) ), is( true ) ); |
| 243 | assertThat( m_index.containsObfMethod( new MethodEntry( m_subClassAA, "a", "()Ljava/lang/String;" ) ), is( true ) ); | 221 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassA, "a", "()Ljava/lang/String;" ) ), is( false ) ); |
| 244 | assertThat( m_index.containsObfMethod( new MethodEntry( m_subClassAA, "a", "()V" ) ), is( true ) ); | 222 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassAA, "a", "()Ljava/lang/String;" ) ), is( true ) ); |
| 245 | assertThat( m_index.containsObfMethod( new MethodEntry( m_subClassB, "a", "()V" ) ), is( true ) ); | 223 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassB, "a", "()Ljava/lang/String;" ) ), is( false ) ); |
| 246 | assertThat( m_index.containsObfMethod( new MethodEntry( m_subClassB, "b", "()V" ) ), is( true ) ); | 224 | |
| 225 | // doBaseThings() | ||
| 226 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_baseClass, "a", "()V" ) ), is( true ) ); | ||
| 227 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassA, "a", "()V" ) ), is( false ) ); | ||
| 228 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassAA, "a", "()V" ) ), is( true ) ); | ||
| 229 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassB, "a", "()V" ) ), is( true ) ); | ||
| 230 | |||
| 231 | // doBThings() | ||
| 232 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_baseClass, "b", "()V" ) ), is( false ) ); | ||
| 233 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassA, "b", "()V" ) ), is( false ) ); | ||
| 234 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassAA, "b", "()V" ) ), is( false ) ); | ||
| 235 | assertThat( m_index.containsObfBehavior( new MethodEntry( m_subClassB, "b", "()V" ) ), is( true ) ); | ||
| 236 | |||
| 247 | } | 237 | } |
| 248 | } | 238 | } |