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);
}
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);
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));
}
}
/** @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());
}
}
String l = normal(lhs);
String r = normal(rhs);
String label = l + NOTSAME + r;
- a.assertTrue(label, l.equals(r));
+ assertTrue(label, l.equals(r));
}
// /**
// 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);
// //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;
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;
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);
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();
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);
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);
}
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
}