aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSebastian Bazley <sebb@apache.org>2015-08-27 23:08:28 +0000
committerSebastian Bazley <sebb@apache.org>2015-08-27 23:08:28 +0000
commit80ed7676093c6ee19c271fd9414d360b6a8d1712 (patch)
tree7cb0cb1c08a224dd0702eecdd0a6b2744034bb5f /src/test
parentc06fa14c5e96ee1114e701cb522bc84e0e1a1a91 (diff)
downloadapache-commons-bcel-80ed7676093c6ee19c271fd9414d360b6a8d1712.tar.gz
BCEL-195 addition of hashCode() to generic/Instruction.java breaks Targeters. Never make distinct BranchInstructions compare equal
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/bcel/trunk@1698243 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/apache/commons/bcel6/generic/InstructionHandleTestCase.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/apache/commons/bcel6/generic/InstructionHandleTestCase.java b/src/test/java/org/apache/commons/bcel6/generic/InstructionHandleTestCase.java
index c7f19e12..08a854da 100644
--- a/src/test/java/org/apache/commons/bcel6/generic/InstructionHandleTestCase.java
+++ b/src/test/java/org/apache/commons/bcel6/generic/InstructionHandleTestCase.java
@@ -35,4 +35,12 @@ public class InstructionHandleTestCase {
public void testGetIHnull() {
InstructionHandle.getInstructionHandle(null);
}
+
+ @Test
+ public void testBCEL195() {
+ InstructionList il = new InstructionList();
+ InstructionHandle ih = il.append(InstructionConstants.NOP);
+ new TABLESWITCH(new int[0], new InstructionHandle[0], ih);
+ new TABLESWITCH(new int[0], new InstructionHandle[0], ih);
+ }
}