From 6f85c78d778c87dd333a7640fd8180de16823c4e Mon Sep 17 00:00:00 2001 From: Ryan Schmitt Date: Wed, 3 Jun 2015 20:34:49 -0700 Subject: [PATCH] Use the Google style guide code formatter --- src/main/java/org/junit/Assert.java | 59 +++++++++++++---------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/src/main/java/org/junit/Assert.java b/src/main/java/org/junit/Assert.java index 6f008cf5f327..4b467fcd2b3a 100755 --- a/src/main/java/org/junit/Assert.java +++ b/src/main/java/org/junit/Assert.java @@ -937,39 +937,36 @@ public static void assertThat(T actual, Matcher matcher) { * assertThat("Zero is one", 0, is(not(1))) // passes * * - * org.hamcrest.Matcher does not currently document the meaning - * of its type parameter T. This method assumes that a matcher - * typed as Matcher<T> can be meaningfully applied only - * to values that could be assigned to a variable of type T. + * org.hamcrest.Matcher does not currently document the meaning of its type + * parameter T. This method assumes that a matcher typed as + * Matcher<T> can be meaningfully applied only to values that could be + * assigned to a variable of type T. * - * @param reason additional information about the error - * @param the static type accepted by the matcher (this can flag obvious - * compile-time problems such as {@code assertThat(1, is("a"))} - * @param actual the computed value being compared - * @param matcher an expression, built of {@link Matcher}s, specifying allowed - * values + * @param reason additional information about the error + * @param the static type accepted by the matcher (this can flag obvious compile-time + * problems such as {@code assertThat(1, is("a"))} + * @param actual the computed value being compared + * @param matcher an expression, built of {@link Matcher}s, specifying allowed values * @see org.hamcrest.CoreMatchers * @see org.hamcrest.MatcherAssert */ public static void assertThat(String reason, T actual, - Matcher matcher) { + Matcher matcher) { MatcherAssert.assertThat(reason, actual, matcher); } /** - * This interface facilitates the use of expectThrows from Java 8. It allows - * method references to void methods (that declare checked exceptions) to be - * passed directly into expectThrows without wrapping. It is not meant to be - * implemented directly. + * This interface facilitates the use of expectThrows from Java 8. It allows method references + * to void methods (that declare checked exceptions) to be passed directly into expectThrows + * without wrapping. It is not meant to be implemented directly. */ public interface ThrowingRunnable { void run() throws Throwable; } /** - * Asserts that {@code runnable} throws an exception when executed. If it - * does, the exception object is returned. If it does not, an - * {@link AssertionError} is thrown. + * Asserts that {@code runnable} throws an exception when executed. If it does, the exception + * object is returned. If it does not, an {@link AssertionError} is thrown. * * @param runnable A function that is expected to throw an exception when executed * @return The exception thrown by {@code runnable} @@ -979,11 +976,11 @@ public static T expectThrows(ThrowingRunnable runnable) { } /** - * Asserts that {@code runnable} throws an exception when executed. If it - * does, the exception object is returned. If it does not, an - * {@link AssertionError} is thrown with the given {@code message}. + * Asserts that {@code runnable} throws an exception when executed. If it does, the exception + * object is returned. If it does not, an {@link AssertionError} is thrown with the given {@code + * message}. * - * @param message the identifying message for the {@link AssertionError} + * @param message the identifying message for the {@link AssertionError} * @param runnable A function that is expected to throw an exception when executed * @return The exception thrown by {@code runnable} */ @@ -992,11 +989,10 @@ public static T expectThrows(String message, ThrowingRunna } /** - * Asserts that {@code runnable} throws an exception of type - * {@code throwableClass} when executed. If it does, the exception object - * is returned. If it does not throw an exception, an {@link AssertionError} - * is thrown. If it throws the wrong type of exception, an - * {@code AssertionError} is thrown describing the mismatch. + * Asserts that {@code runnable} throws an exception of type {@code throwableClass} when + * executed. If it does, the exception object is returned. If it does not throw an exception, an + * {@link AssertionError} is thrown. If it throws the wrong type of exception, an {@code + * AssertionError} is thrown describing the mismatch. * * @param throwableClass the expected type of the exception * @param runnable A function that is expected to throw an exception when executed @@ -1007,13 +1003,12 @@ public static T expectThrows(Class throwableClass, Thro } /** - * Asserts that {@code runnable} throws an exception of type - * {@code throwableClass} when executed. If it does, the exception object - * is returned. If it does not throw an exception, an {@link AssertionError} - * is thrown with the given {@code message}. If it throws the wrong type + * Asserts that {@code runnable} throws an exception of type {@code throwableClass} when + * executed. If it does, the exception object is returned. If it does not throw an exception, an + * {@link AssertionError} is thrown with the given {@code message}. If it throws the wrong type * of exception, an {@code AssertionError} is thrown describing the mismatch. * - * @param message the identifying message for the {@link AssertionError} + * @param message the identifying message for the {@link AssertionError} * @param throwableClass the expected type of the exception * @param runnable A function that is expected to throw an exception when executed * @return The exception thrown by {@code runnable}