Skip to content
Browse files

added test case for

fixed problem with method compilation where it was planting an
invokevirtual where invokeinterface was needed

fixes for BYTEMAN-219
  • Loading branch information...
1 parent d075777 commit 19c26833739e43ca1d4add71c647b01accca0fb2 @adinn adinn committed Nov 26, 2012
View
11 agent/src/test/java/org/jboss/byteman/tests/auxiliary/C3.java
@@ -0,0 +1,11 @@
+package org.jboss.byteman.tests.auxiliary;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: 26/11/12
+ * Time: 12:31
+ * To change this template use File | Settings | File Templates.
+ */
+public class C3 {
+}
View
11 agent/src/test/java/org/jboss/byteman/tests/auxiliary/C4.java
@@ -0,0 +1,11 @@
+package org.jboss.byteman.tests.auxiliary;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: 26/11/12
+ * Time: 12:33
+ * To change this template use File | Settings | File Templates.
+ */
+public class C4 {
+}
View
11 agent/src/test/java/org/jboss/byteman/tests/auxiliary/I5.java
@@ -0,0 +1,11 @@
+package org.jboss.byteman.tests.auxiliary;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: 26/11/12
+ * Time: 12:30
+ * To change this template use File | Settings | File Templates.
+ */
+public class I5 {
+}
View
11 agent/src/test/java/org/jboss/byteman/tests/bugfixes/TestAbstractInterfaceCall.java
@@ -0,0 +1,11 @@
+package org.jboss.byteman.tests.bugfixes;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: 26/11/12
+ * Time: 12:26
+ * To change this template use File | Settings | File Templates.
+ */
+public class TestAbstractInterfaceCall {
+}
View
43 agent/src/test/resources/scripts/bugfixes/TestAbstractInterfaceCall.btm
@@ -0,0 +1,43 @@
+##############################################################################
+# JBoss, Home of Professional Open Source
+# Copyright 2009, Red Hat and individual contributors
+# by the @authors tag. See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+# @authors Andrew Dinn
+#
+# Test for bug reported by Flavia Rainone JIRA BYTEMAN-140 where the Transformer
+# injection through interfaces was failing to traverse the interface extends hierarchy.
+
+RULE test interface injection without overriding
+INTERFACE I3
+METHOD testMethod(Test)
+HELPER org.jboss.byteman.tests.helpers.Default
+BIND test : TestInterfaceHierarchy = $1
+IF TRUE
+DO test.log("I3.testMethod() AT ENTRY");
+ENDRULE
+
+RULE test interface injection with overriding
+INTERFACE ^I3
+METHOD testMethod(Test)
+HELPER org.jboss.byteman.tests.helpers.Default
+BIND test : TestInterfaceHierarchy = $1
+IF TRUE
+DO test.log("^I3.testMethod() AT ENTRY");
+ENDRULE

0 comments on commit 19c2683

Please sign in to comment.
Something went wrong with that request. Please try again.