Permalink
Browse files

Fixed problems with style and other small issues

  • Loading branch information...
1 parent 7b5e0ac commit 72e10d3ca80ae76af8920091736882a6dc0a5036 @jcortez jcortez committed Apr 27, 2012
View
@@ -161,4 +161,3 @@
== NOTE: as of September 2011, we have stopped recording contributions here.
For a full list of everyone who has contributed great bug reports and code, please see
http://github.com/KentBeck/junit
->>>>>>> upstream/master
@@ -465,13 +465,9 @@ static public void assertEquals(String message, double expected,
static public void assertEquals(String message, float expected,
float actual, float delta) {
if (Float.compare(expected, actual) == 0)
- {
return;
- }
if (!(Math.abs(expected - actual) <= delta))
- {
failNotEquals(message, new Float(expected), new Float(actual));
- }
}
/**
@@ -1,8 +1,6 @@
package org.junit.runners.model;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
/**
@@ -17,11 +15,11 @@
* errors {@code errors} as causes
*/
public InitializationError(List<Throwable> errors) {
- fErrors= new ArrayList<Throwable>(errors);
+ fErrors= errors;
}
public InitializationError(Throwable error) {
- fErrors= Arrays.asList(error);
+ this(Arrays.asList(error));
}
/**
@@ -36,16 +34,6 @@ public InitializationError(String string) {
* Returns one or more Throwables that led to this initialization error.
*/
public List<Throwable> getCauses() {
- return Collections.unmodifiableList(fErrors);
- }
-
- @Override
- public String getMessage() {
- StringBuilder sb = new StringBuilder(
- String.format("There were %d errors:", fErrors.size()));
- for (Throwable e : fErrors) {
- sb.append(String.format("\n %s(%s)", e.getClass().getName(), e.getMessage()));
- }
- return sb.toString();
+ return fErrors;
}
}

0 comments on commit 72e10d3

Please sign in to comment.