summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Masutti2013-03-21 15:10:47 (EDT)
committerMarkus Keller2013-03-21 15:10:47 (EDT)
commit7bbe6eb55f88280cdbb36797a69a24f1f6fb2649 (patch)
tree4e71707d50a87faa563796110aa197297f82024f
parentac363e063ab27f9187b62de26868fc5b08876b02 (diff)
downloadeclipse.jdt.ui-7bbe6eb55f88280cdbb36797a69a24f1f6fb2649.zip
eclipse.jdt.ui-7bbe6eb55f88280cdbb36797a69a24f1f6fb2649.tar.gz
eclipse.jdt.ui-7bbe6eb55f88280cdbb36797a69a24f1f6fb2649.tar.bz2
Bug 397747: [JUnit] JUnit3TestReference handles JUnit4TestAdapter incorrectly
-rw-r--r--org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3TestReference.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3TestReference.java b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3TestReference.java
index c8e3f86..9aa9401 100644
--- a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3TestReference.java
+++ b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3TestReference.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2013 IBM Corporation and others.
* 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* David Saff (saff@mit.edu) - initial API and implementation
* (bug 102632: [JUnit] Support for JUnit 4.)
+ * Oliver Masutti <eclipse@masutti.ch> - [JUnit] JUnit3TestReference handles JUnit4TestAdapter incorrectly - https://bugs.eclipse.org/397747
*******************************************************************************/
package org.eclipse.jdt.internal.junit.runner.junit3;
@@ -142,8 +143,8 @@ public class JUnit3TestReference implements ITestReference {
sendTreeOfChild(suite.testAt(i), notified);
}
} else if (isJUnit4TestSuiteAdapter(fTest)) {
- notified.visitTreeEntry(getIdentifier(), true, fTest.countTestCases());
List tests= (List) callJUnit4GetterMethod(fTest, "getTests"); //$NON-NLS-1$
+ notified.visitTreeEntry(getIdentifier(), true, tests.size());
for (Iterator iter= tests.iterator(); iter.hasNext();) {
sendTreeOfChild((Test) iter.next(), notified);
}