aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/javassist/JvstTest5.java
diff options
context:
space:
mode:
authorchibash <chiba@javassist.org>2015-01-25 18:16:48 +0900
committerchibash <chiba@javassist.org>2015-01-25 18:16:48 +0900
commite59339343a538699b632bd9fa0cf4f251ab6f3ee (patch)
tree3a0f9f1c3d8d9058a787057b519377f43d3e1775 /src/test/javassist/JvstTest5.java
parente8c023af06f04877ccc83911c6f6900574486a6c (diff)
downloadjavassist-e59339343a538699b632bd9fa0cf4f251ab6f3ee.tar.gz
javassist-e59339343a538699b632bd9fa0cf4f251ab6f3ee.zip
fixed JIRA JASSIST-241
Diffstat (limited to 'src/test/javassist/JvstTest5.java')
-rw-r--r--src/test/javassist/JvstTest5.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/javassist/JvstTest5.java b/src/test/javassist/JvstTest5.java
index becd5c59..124f585d 100644
--- a/src/test/javassist/JvstTest5.java
+++ b/src/test/javassist/JvstTest5.java
@@ -44,4 +44,13 @@ public class JvstTest5 extends JvstTestRoot {
Annotation[] annos = t.getAnnotations();
assertEquals("@test5.TypeAnnoA()", annos[0].toString());
}
+
+ public void testJIRA241() throws Exception {
+ CtClass cc = sloader.get("test5.JIRA241");
+ CtMethod testMethod = cc.getDeclaredMethod("test");
+ testMethod.insertAfter("System.out.println(\"inserted!\");");
+ cc.writeFile();
+ Object obj = make(cc.getName());
+ assertEquals(10, invoke(obj, "run"));
+ }
}