aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-02-28 03:19:42 +0000
committerwisberg <wisberg>2003-02-28 03:19:42 +0000
commit9fe03ff9e85d6cb4d69d931ac6b5ed03321d4bb9 (patch)
tree2cdb16922e411b2fc26547465c4e2fee850f9062 /testing
parented9de600ba6cca69f60d93d6f800d11f6b49d96f (diff)
downloadaspectj-9fe03ff9e85d6cb4d69d931ac6b5ed03321d4bb9.tar.gz
aspectj-9fe03ff9e85d6cb4d69d931ac6b5ed03321d4bb9.zip
avoiding compiler warning wrt static ref via instance
Diffstat (limited to 'testing')
-rw-r--r--testing/testsrc/org/aspectj/testing/harness/bridge/AjcSpecTest.java100
-rw-r--r--testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java3
2 files changed, 52 insertions, 51 deletions
diff --git a/testing/testsrc/org/aspectj/testing/harness/bridge/AjcSpecTest.java b/testing/testsrc/org/aspectj/testing/harness/bridge/AjcSpecTest.java
index 6424da62e..06ae38ada 100644
--- a/testing/testsrc/org/aspectj/testing/harness/bridge/AjcSpecTest.java
+++ b/testing/testsrc/org/aspectj/testing/harness/bridge/AjcSpecTest.java
@@ -44,18 +44,18 @@ public class AjcSpecTest extends TestCase {
AjcTest.Spec rhsTest = (AjcTest.Spec) rhs.next();
AjcSpecTest.sameAjcTestSpec(lhsTest, rhsTest, a);
}
- a.assertTrue(!lhs.hasNext());
- a.assertTrue(!rhs.hasNext());
+ assertTrue(!lhs.hasNext());
+ assertTrue(!rhs.hasNext());
}
public static void sameAjcTestSpec(
AjcTest.Spec lhsTest,
AjcTest.Spec rhsTest,
Assert a) {
- a.assertNotNull(lhsTest);
- a.assertNotNull(rhsTest);
- a.assertEquals(lhsTest.getBugId(), rhsTest.getBugId());
- a.assertEquals(lhsTest.getTestDirOffset(), rhsTest.getTestDirOffset());
+ assertNotNull(lhsTest);
+ assertNotNull(rhsTest);
+ assertEquals(lhsTest.getBugId(), rhsTest.getBugId());
+ assertEquals(lhsTest.getTestDirOffset(), rhsTest.getTestDirOffset());
// XXX suiteDir varies by run..
sameAbstractRunSpec(lhsTest, rhsTest, a);
}
@@ -64,7 +64,7 @@ public class AjcSpecTest extends TestCase {
AbstractRunSpec lhs,
AbstractRunSpec rhs,
Assert a) {
- a.assertEquals(lhs.description, rhs.description);
+ assertEquals(lhs.description, rhs.description);
// XXX keywords added in .txt reading -
//sameList(lhs.getKeywordsList(), rhs.getKeywordsList(), a);
// XXX sameList(lhs.globalOptions, rhs.globalOptions, a);
@@ -89,19 +89,19 @@ public class AjcSpecTest extends TestCase {
public static void same(Object lhs, Object rhs, Assert a) {
lhs = normal(lhs);
rhs = normal(rhs);
- a.assertTrue(lhs + NOTSAME + rhs, lhs.equals(rhs));
+ assertTrue(lhs + NOTSAME + rhs, lhs.equals(rhs));
}
/** @return true if both are empty (null or no entries) or if all match */
public static void sameRA(String[] lhs, String[] rhs, Assert a) {
if (null == lhs) {
- a.assertTrue((null == rhs) || (0 == rhs.length));
+ assertTrue((null == rhs) || (0 == rhs.length));
} else if (null == rhs) {
- a.assertTrue(0 == lhs.length);
+ assertTrue(0 == lhs.length);
} else {
String l = normal(lhs);
String r = normal(rhs);
- a.assertTrue(l + NOTSAME + r, l.equals(r));
+ assertTrue(l + NOTSAME + r, l.equals(r));
}
}
@@ -131,11 +131,11 @@ public class AjcSpecTest extends TestCase {
/** @return true if both are empty (null or no entries) or if all match after trimming */
public static void sameListSize(List lhs, List rhs, Assert a) {
if (null == lhs) {
- a.assertTrue((null == rhs) || (0 == rhs.size()));
+ assertTrue((null == rhs) || (0 == rhs.size()));
} else if (null == rhs) {
- a.assertTrue(0 == lhs.size());
+ assertTrue(0 == lhs.size());
} else {
- a.assertTrue(rhs.size() == lhs.size());
+ assertTrue(rhs.size() == lhs.size());
}
}
@@ -145,7 +145,7 @@ public class AjcSpecTest extends TestCase {
String l = normal(lhs);
String r = normal(rhs);
String label = l + NOTSAME + r;
- a.assertTrue(label, l.equals(r));
+ assertTrue(label, l.equals(r));
}
// /**
@@ -159,9 +159,9 @@ public class AjcSpecTest extends TestCase {
// public static void sameAjcTest(AjcTest lhs, AjcTest rhs, Assert reporter) {
// Assert a = reporter;
// String label = lhs + NOTSAME + rhs;
-// a.assertTrue(label, null != lhs);
-// a.assertTrue(label, null != rhs);
-// //a.assertTrue(label, lhs.ignoreWarnings == rhs.ignoreWarnings);
+// assertTrue(label, null != lhs);
+// assertTrue(label, null != rhs);
+// //assertTrue(label, lhs.ignoreWarnings == rhs.ignoreWarnings);
// // XXX disabled - not in .txt
// // sameStringList(lhs.keywords, rhs.keywords, a);
// // sameString(lhs.bugId, rhs.bugId, a);
@@ -172,25 +172,25 @@ public class AjcSpecTest extends TestCase {
// //rhs.reset();
// boolean gotOne = false;
// IMessageHolder holder = new MessageHandler();
-// a.assertTrue(label, !holder.hasAnyMessage(IMessage.FAIL, IMessageHolder.ORGREATER));
+// assertTrue(label, !holder.hasAnyMessage(IMessage.FAIL, IMessageHolder.ORGREATER));
// while (lhs.hasNextRun() && rhs.hasNextRun()) {
// sameIAjcRun((IAjcRun) lhs.nextRun(holder), (IAjcRun) rhs.nextRun(holder), reporter);
-// a.assertTrue(label, !holder.hasAnyMessage(IMessage.FAIL, IMessageHolder.ORGREATER));
+// assertTrue(label, !holder.hasAnyMessage(IMessage.FAIL, IMessageHolder.ORGREATER));
// if (!gotOne) {
// gotOne = true;
// }
// }
-// a.assertTrue(label, gotOne);
-// a.assertTrue(label, !lhs.hasNextRun());
-// a.assertTrue(label, !rhs.hasNextRun());
+// assertTrue(label, gotOne);
+// assertTrue(label, !lhs.hasNextRun());
+// assertTrue(label, !rhs.hasNextRun());
// }
public static void sameIAjcRun(IAjcRun lhs, IAjcRun rhs, Assert reporter) {
Assert a = reporter;
- a.assertTrue(lhs != null);
- a.assertTrue(rhs != null);
+ assertTrue(lhs != null);
+ assertTrue(rhs != null);
Class c = lhs.getClass();
- a.assertTrue(c == rhs.getClass());
+ assertTrue(c == rhs.getClass());
AbstractRunSpec lhsSpec;
AbstractRunSpec rhsSpec;
@@ -199,15 +199,15 @@ public class AjcSpecTest extends TestCase {
CompilerRun.Spec r = ((CompilerRun) rhs).spec;
lhsSpec = l;
rhsSpec = r;
- a.assertEquals(l.testSrcDirOffset, r.testSrcDirOffset);
- a.assertEquals(l.compiler, r.compiler);
+ assertEquals(l.testSrcDirOffset, r.testSrcDirOffset);
+ assertEquals(l.compiler, r.compiler);
} else if (c == JavaRun.class) {
JavaRun.Spec l = ((JavaRun) lhs).spec;
JavaRun.Spec r = ((JavaRun) rhs).spec;
lhsSpec = l;
rhsSpec = r;
- a.assertTrue(l.skipTester == r.skipTester);
- a.assertEquals(l.className, r.className);
+ assertTrue(l.skipTester == r.skipTester);
+ assertEquals(l.className, r.className);
} else if (c == IncCompilerRun.class) {
IncCompilerRun.Spec l = ((IncCompilerRun) lhs).spec;
IncCompilerRun.Spec r = ((IncCompilerRun) rhs).spec;
@@ -224,9 +224,9 @@ public class AjcSpecTest extends TestCase {
if ((null == lhs) && (null == rhs)) {
return;
}
- a.assertTrue(lhs != null);
- a.assertTrue(rhs != null);
- a.assertEquals(""+lhs.getOptionsList(), ""+rhs.getOptionsList());
+ assertTrue(lhs != null);
+ assertTrue(rhs != null);
+ assertEquals(""+lhs.getOptionsList(), ""+rhs.getOptionsList());
sameList(lhs.getPathsList(), rhs.getPathsList(), a);
sameMessages(lhs.getMessages(), rhs.getMessages(), a);
sameDirChangesList(lhs.dirChanges, rhs.dirChanges, a);
@@ -236,8 +236,8 @@ public class AjcSpecTest extends TestCase {
if ((null == lhs) && (null == rhs)) {
return;
}
- a.assertTrue(rhs != null);
- a.assertTrue(lhs != null);
+ assertTrue(rhs != null);
+ assertTrue(lhs != null);
sameListSize(lhs, rhs, a);
Iterator lhsIter = lhs.iterator();
Iterator rhsIter = rhs.iterator();
@@ -250,12 +250,12 @@ public class AjcSpecTest extends TestCase {
if ((null == lhs) && (null == rhs)) {
return;
}
- a.assertTrue(rhs != null);
- a.assertTrue(lhs != null);
- a.assertEquals(lhs.defaultSuffix, rhs.defaultSuffix);
- a.assertEquals(lhs.dirToken, rhs.dirToken);
- a.assertEquals(lhs.fastFail, rhs.fastFail);
- a.assertEquals(lhs.expDir, rhs.expDir); // XXX normalize?
+ assertTrue(rhs != null);
+ assertTrue(lhs != null);
+ assertEquals(lhs.defaultSuffix, rhs.defaultSuffix);
+ assertEquals(lhs.dirToken, rhs.dirToken);
+ assertEquals(lhs.fastFail, rhs.fastFail);
+ assertEquals(lhs.expDir, rhs.expDir); // XXX normalize?
sameList(lhs.updated, rhs.updated, a);
sameList(lhs.removed, rhs.removed, a);
sameList(lhs.added, rhs.added, a);
@@ -278,11 +278,11 @@ public class AjcSpecTest extends TestCase {
if ((null == lhs) && (null == rhs)) {
return;
}
- a.assertTrue(lhs != null);
- a.assertTrue(rhs != null);
- a.assertTrue(lhs.getKind() == rhs.getKind());
+ assertTrue(lhs != null);
+ assertTrue(rhs != null);
+ assertTrue(lhs.getKind() == rhs.getKind());
same(lhs.getMessage(), rhs.getMessage(), a);
- a.assertEquals(lhs.getThrown(), rhs.getThrown());
+ assertEquals(lhs.getThrown(), rhs.getThrown());
sameSourceLocation(lhs.getISourceLocation(), rhs.getISourceLocation(), a);
}
@@ -290,11 +290,11 @@ public class AjcSpecTest extends TestCase {
if ((null == lhs) && (null == rhs)) {
return;
}
- a.assertTrue(lhs != null);
- a.assertTrue(rhs != null);
- a.assertTrue(lhs.getLine() == rhs.getLine());
- a.assertTrue(lhs.getColumn() == rhs.getColumn());
- a.assertTrue(lhs.getEndLine() == rhs.getEndLine());
+ assertTrue(lhs != null);
+ assertTrue(rhs != null);
+ assertTrue(lhs.getLine() == rhs.getLine());
+ assertTrue(lhs.getColumn() == rhs.getColumn());
+ assertTrue(lhs.getEndLine() == rhs.getEndLine());
// XXX need to compare files, permitting null == NONE
}
diff --git a/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java b/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java
index 38ff3f9f6..fb46f3014 100644
--- a/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java
+++ b/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java
@@ -62,7 +62,8 @@ public class AjcSpecXmlReaderTest extends TestCase {
/** test that all AjcSpecXmlReader.me.expectedProperties() are bean-writable */
public void testBeanInfo() throws IntrospectionException {
AjcSpecXmlReader me = AjcSpecXmlReader.getReader();
- AjcSpecXmlReader.BProps[] expected = me.expectedProperties();
+ AjcSpecXmlReader.BProps[] expected
+ = AjcSpecXmlReader.expectedProperties();
PropertyDescriptor[] des;
for (int i = 0; i < expected.length; i++) {
Class clazz = expected[i].cl;