diff options
author | Andy Clement <aclement@pivotal.io> | 2020-08-14 10:56:10 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2020-08-14 10:56:10 -0700 |
commit | b0b2f50a27499227580852496964e037e9204f22 (patch) | |
tree | a3e327b7903c5edc7b0735399b20d6fe881d69e1 /tests | |
parent | e5c41da8638f924a6ba5ed4acd2da45784412fa2 (diff) | |
download | aspectj-b0b2f50a27499227580852496964e037e9204f22.tar.gz aspectj-b0b2f50a27499227580852496964e037e9204f22.zip |
Fix up tests and reduce verbosity on J11
Diffstat (limited to 'tests')
3 files changed, 22 insertions, 15 deletions
diff --git a/tests/bugs170/xmldefs/Hello5.java b/tests/bugs170/xmldefs/Hello5.java index 361415a3e..62efc30e1 100644 --- a/tests/bugs170/xmldefs/Hello5.java +++ b/tests/bugs170/xmldefs/Hello5.java @@ -26,7 +26,7 @@ public class Hello5 { System.out.println("Annotation count is "+annos.length); for (Annotation anno: la) { - System.out.println(anno); + print(anno); } } } catch (Exception e) { @@ -34,6 +34,15 @@ public class Hello5 { } } + static void print(Annotation anno) { + if (anno instanceof AnnoDouble) { + AnnoDouble ad = ((AnnoDouble)anno); + System.out.println("@AnnoDouble(value="+ad.value()+",ddd="+ad.ddd()+")"); + } else { + System.out.println(anno); + } + } + static class AnnoComparator implements Comparator<Annotation> { public int compare(Annotation a, Annotation b) { return a.toString().compareTo(b.toString()); diff --git a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java index 58ab1959d..5cfb4b1a7 100644 --- a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java +++ b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java @@ -1,11 +1,11 @@ /******************************************************************** - * Copyright (c) 2005 Contributors.All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://eclipse.org/legal/epl-v10.html - * - * Contributors: + * Copyright (c) 2005 Contributors.All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://eclipse.org/legal/epl-v10.html + * + * Contributors: * Andy Clement initial implementation * Helen Hawkins Converted to new interface (bug 148190) *******************************************************************/ @@ -15,7 +15,6 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; @@ -35,14 +34,14 @@ import junit.framework.TestCase; /** * This class uses Ajde in the same way that an IDE (e.g. AJDT) does. - * + * * The build is driven through 'doBuild(projectName)' but the build can be configured by the methods beginning 'configure***'. * Information about what happened during a build is accessible through the get*, was*, print* public methods... - * + * */ public class AjdeInteractionTestbed extends TestCase { - public static boolean VERBOSE = false; // do you want the gory details? + public static boolean VERBOSE = System.getProperty("aspectj.tests.verbose","true").equalsIgnoreCase("true"); public static String testdataSrcDir = "../tests/multiIncremental"; protected static File sandboxDir; @@ -552,5 +551,5 @@ public class AjdeInteractionTestbed extends TestCase { decisions.append(s).append("\n"); log(s); } - }; + } }
\ No newline at end of file diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml index dcd08917f..fde9ff259 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc170/ajc170.xml @@ -204,8 +204,7 @@ <line text="Annotation count is 4"/> <line text="@AnnoChar(value=z, ccc=a)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/> <line text="@AnnoChar(value='z', ccc='a')" vm="9+"/> - <line text="@AnnoDouble(ddd=3.0, value=99.0)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/> - <line text="@AnnoDouble(value=99.0, ddd=3.0)" vm="11,12,13,14+"/> + <line text="@AnnoDouble(value=99.0,ddd=3.0)"/> <line text="@AnnoFloat(value=6.0, fff=4.0)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/> <line text="@AnnoFloat(value=6.0f, fff=4.0f)" vm="9+"/> <line text="@AnnoShort(value=8, sss=3)"/> |