Skip to content

Commit

Permalink
Fixed problems with style and other small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jcortez committed Apr 27, 2012
1 parent 7b5e0ac commit 72e10d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
1 change: 0 additions & 1 deletion acknowledgements.txt
Expand Up @@ -161,4 +161,3 @@
== NOTE: as of September 2011, we have stopped recording contributions here. == 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 For a full list of everyone who has contributed great bug reports and code, please see
http://github.com/KentBeck/junit http://github.com/KentBeck/junit
>>>>>>> upstream/master
4 changes: 0 additions & 4 deletions src/main/java/org/junit/Assert.java
Expand Up @@ -465,13 +465,9 @@ static public void assertEquals(String message, double expected,
static public void assertEquals(String message, float expected, static public void assertEquals(String message, float expected,
float actual, float delta) { float actual, float delta) {
if (Float.compare(expected, actual) == 0) if (Float.compare(expected, actual) == 0)
{
return; return;
}
if (!(Math.abs(expected - actual) <= delta)) if (!(Math.abs(expected - actual) <= delta))
{
failNotEquals(message, new Float(expected), new Float(actual)); failNotEquals(message, new Float(expected), new Float(actual));
}
} }


/** /**
Expand Down
18 changes: 3 additions & 15 deletions src/main/java/org/junit/runners/model/InitializationError.java
@@ -1,8 +1,6 @@
package org.junit.runners.model; package org.junit.runners.model;


import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;


/** /**
Expand All @@ -17,11 +15,11 @@ public class InitializationError extends Exception {
* errors {@code errors} as causes * errors {@code errors} as causes
*/ */
public InitializationError(List<Throwable> errors) { public InitializationError(List<Throwable> errors) {
fErrors= new ArrayList<Throwable>(errors); fErrors= errors;
} }


public InitializationError(Throwable error) { public InitializationError(Throwable error) {
fErrors= Arrays.asList(error); this(Arrays.asList(error));
} }


/** /**
Expand All @@ -36,16 +34,6 @@ public InitializationError(String string) {
* Returns one or more Throwables that led to this initialization error. * Returns one or more Throwables that led to this initialization error.
*/ */
public List<Throwable> getCauses() { public List<Throwable> getCauses() {
return Collections.unmodifiableList(fErrors); return 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();
} }
} }

0 comments on commit 72e10d3

Please sign in to comment.