From 2eb9dd812120f6e8fbfbf59c31ee16d2ff68b032 Mon Sep 17 00:00:00 2001 From: acolyer Date: Thu, 17 Feb 2005 15:05:58 +0000 Subject: only inspect results if test could run --- .../src/org/aspectj/systemtest/ajc150/Annotations.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/src/org/aspectj/systemtest/ajc150/Annotations.java b/tests/src/org/aspectj/systemtest/ajc150/Annotations.java index d242697bf..f8bc17ce1 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Annotations.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Annotations.java @@ -49,15 +49,17 @@ public class Annotations extends XMLBasedAjcTestCase { */ public void testBugWithAnnotationsLostOnWovenMethods() throws ClassNotFoundException { runTest("losing annotations..."); - - JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"Program"); - Method[] meths = jc.getMethods(); - for (int i = 0; i < meths.length; i++) { - Method method = meths[i]; - if (method.getName().equals("m1")) { - assertTrue("Didn't have annotations - were they lost? method="+method.getName(),method.getAnnotations().length==1); + if (getCurrentTest().canRunOnThisVM()) { + + JavaClass jc = getClassFrom(ajc.getSandboxDirectory(),"Program"); + Method[] meths = jc.getMethods(); + for (int i = 0; i < meths.length; i++) { + Method method = meths[i]; + if (method.getName().equals("m1")) { + assertTrue("Didn't have annotations - were they lost? method="+method.getName(),method.getAnnotations().length==1); + } } - } + } } public void testAnnotatedAnnotations() { -- cgit v1.2.3