diff options
Diffstat (limited to 'testing-drivers/src')
3 files changed, 16 insertions, 16 deletions
diff --git a/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java b/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java index f1c8b3635..e932a027d 100644 --- a/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java +++ b/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java @@ -323,10 +323,10 @@ public class Harness { */ private void doEndSuite(File suiteFile, long elapsed) { Collection c = features.values(); - for (Iterator iter = c.iterator(); iter.hasNext();) { - Feature element = (Feature) iter.next(); + for (Object o : c) { + Feature element = (Feature) o; if (element.listener instanceof TestCompleteListener) { - ((TestCompleteListener)element.listener).doEndSuite(suiteFile,elapsed); + ((TestCompleteListener) element.listener).doEndSuite(suiteFile, elapsed); } } } diff --git a/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessJUnitUtil.java b/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessJUnitUtil.java index d3e05f84c..b26b5286f 100644 --- a/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessJUnitUtil.java +++ b/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessJUnitUtil.java @@ -50,12 +50,12 @@ public class HarnessJUnitUtil { if (HarnessJUnitUtil.isEmpty(options)) { options = new String[][] {new String[0]}; } - for (int i = 0; i < suites.length; i++) { - for (int j = 0; j < options.length; j++) { - Test t = AjctestsAdapter.make(suites[i], options[j]); - suite.addTest(t); - } - } + for (String s : suites) { + for (String[] option : options) { + Test t = AjctestsAdapter.make(s, option); + suite.addTest(t); + } + } } return suite; } diff --git a/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessSelectionTest.java b/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessSelectionTest.java index ac937ac44..a292962fc 100644 --- a/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessSelectionTest.java +++ b/testing-drivers/src/test/java/org/aspectj/testing/drivers/HarnessSelectionTest.java @@ -87,9 +87,9 @@ public class HarnessSelectionTest extends TestCase { String[] files = new String[] { SELECT, INCREMENTAL, TITLE_LIST_ONE, TITLE_LIST_PLURAL }; - for (int i = 0; i < files.length; i++) { - assertTrue(files[i], new File(files[i]).canRead()); - } + for (String file : files) { + assertTrue(file, new File(file).canRead()); + } } public void testIncrementalSuite() { @@ -358,10 +358,10 @@ public class HarnessSelectionTest extends TestCase { assertTrue(children.length + "!= expRun=" + exp.testsRun, exp.testsRun == children.length); int actPass = 0; - for (int i = 0; i < children.length; i++) { - if (RunValidator.NORMAL.runPassed(children[i])) { - actPass++; - } + for (IRunStatus child : children) { + if (RunValidator.NORMAL.runPassed(child)) { + actPass++; + } } if (exp.passed != actPass) { assertTrue("exp.passed=" + exp.passed + " != actPass=" + actPass, false); |