diff options
Diffstat (limited to 'src/test/javassist')
-rw-r--r-- | src/test/javassist/JvstTest4.java | 4 | ||||
-rw-r--r-- | src/test/javassist/JvstTest5.java | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java index c39f6700..549102f0 100644 --- a/src/test/javassist/JvstTest4.java +++ b/src/test/javassist/JvstTest4.java @@ -661,9 +661,9 @@ public class JvstTest4 extends JvstTestRoot { long t2 = endTime2 - endTime; long t3 = endTime3 - endTime2; System.out.println("JIRA150: " + t1 + ", " + t2 + ", " + t3); - assertTrue("performance test (the next try may succeed): " + t1 + "/ 6 < " + t2, + assertTrue("performance test (the next try may succeed): " + t2 + " < 6 * " + t1, t2 < t1 * 6); - assertTrue("", t3 < t1 * 3); + assertTrue(t3 + " < 3 * " + t1, t3 < t1 * 3); } public void testJIRA150b() throws Exception { 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")); + } } |