Update junit with Android specific changes.
This is an copy of changes from libcore/junit.
Bug 5826326
Change-Id: Idc87fe9b5dbf0a29f5f9cf7c618d32e005a0a7fb
diff --git a/src/junit/extensions/package.html b/src/junit/extensions/package.html
new file mode 100644
index 0000000..6b4be72
--- /dev/null
+++ b/src/junit/extensions/package.html
@@ -0,0 +1,6 @@
+<HTML>
+<BODY>
+Utility classes supporting the junit test framework.
+{@hide} - Not needed for 1.0 SDK
+</BODY>
+</HTML>
diff --git a/src/junit/framework/ComparisonCompactor.java b/src/junit/framework/ComparisonCompactor.java
index bbc3ba1..24ad42f 100644
--- a/src/junit/framework/ComparisonCompactor.java
+++ b/src/junit/framework/ComparisonCompactor.java
@@ -1,5 +1,9 @@
package junit.framework;
+// android-changed add @hide
+/**
+ * @hide not needed for public API
+ */
public class ComparisonCompactor {
private static final String ELLIPSIS= "...";
diff --git a/src/junit/framework/TestResult.java b/src/junit/framework/TestResult.java
index 5768e9a..3052e94 100644
--- a/src/junit/framework/TestResult.java
+++ b/src/junit/framework/TestResult.java
@@ -4,6 +4,7 @@
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
+import java.util.Vector;
/**
* A <code>TestResult</code> collects the results of executing
@@ -15,16 +16,20 @@
* @see Test
*/
public class TestResult extends Object {
- protected List<TestFailure> fFailures;
- protected List<TestFailure> fErrors;
- protected List<TestListener> fListeners;
+ // BEGIN android-changed changed types from List<> to Vector<> for API compatibility
+ protected Vector<TestFailure> fFailures;
+ protected Vector<TestFailure> fErrors;
+ protected Vector<TestListener> fListeners;
+ // END android-changed
protected int fRunTests;
private boolean fStop;
public TestResult() {
- fFailures= new ArrayList<TestFailure>();
- fErrors= new ArrayList<TestFailure>();
- fListeners= new ArrayList<TestListener>();
+ // BEGIN android-changed to Vector
+ fFailures= new Vector<TestFailure>();
+ fErrors= new Vector<TestFailure>();
+ fListeners= new Vector<TestListener>();
+ // END android-changed
fRunTests= 0;
fStop= false;
}
@@ -166,4 +171,4 @@
public synchronized boolean wasSuccessful() {
return failureCount() == 0 && errorCount() == 0;
}
-}
\ No newline at end of file
+}
diff --git a/src/junit/framework/package.html b/src/junit/framework/package.html
new file mode 100644
index 0000000..770d470
--- /dev/null
+++ b/src/junit/framework/package.html
@@ -0,0 +1,5 @@
+<HTML>
+<BODY>
+The junit test framework.
+</BODY>
+</HTML>