aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/Assume.java
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2021-02-24 18:57:51 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-24 18:57:51 +0000
commit91c5e5ff9d71ebc00818b310c09b175016c36dc2 (patch)
tree81124de095a6b4a53b223d0f70cadde9744ee44a /src/main/java/org/junit/Assume.java
parent82af4b8b1d440f44b6ebac4db1fd61ae1d35a15e (diff)
parent23e304a839c5924c7ac7399076318adc511e9985 (diff)
downloadjunit-91c5e5ff9d71ebc00818b310c09b175016c36dc2.tar.gz
Merge changes from topic "revert-1601635-AIQYZOHWTP" am: 565f36d281 am: 23e304a839
Original change: https://android-review.googlesource.com/c/platform/external/junit/+/1605377 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I443f57dd29ed2557b7733b1f3e51718d5d6a2af4
Diffstat (limited to 'src/main/java/org/junit/Assume.java')
-rw-r--r--src/main/java/org/junit/Assume.java19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/main/java/org/junit/Assume.java b/src/main/java/org/junit/Assume.java
index 29b705b..b7687f7 100644
--- a/src/main/java/org/junit/Assume.java
+++ b/src/main/java/org/junit/Assume.java
@@ -14,7 +14,7 @@ import org.hamcrest.Matcher;
* basically means "don't run this test if these conditions don't apply". The default JUnit runner skips tests with
* failing assumptions. Custom runners may behave differently.
* <p>
- * A good example of using assumptions is in <a href="https://github.com/junit-team/junit4/wiki/Theories">Theories</a> where they are needed to exclude certain datapoints that aren't suitable or allowed for a certain test case.
+ * A good example of using assumptions is in <a href="https://github.com/junit-team/junit/wiki/Theories">Theories</a> where they are needed to exclude certain datapoints that aren't suitable or allowed for a certain test case.
* </p>
* Failed assumptions are usually not logged, because there may be many tests that don't apply to certain
* configurations.
@@ -29,20 +29,11 @@ import org.hamcrest.Matcher;
* </pre>
* </p>
*
- * @see <a href="https://github.com/junit-team/junit4/wiki/Theories">Theories</a>
+ * @see <a href="https://github.com/junit-team/junit/wiki/Theories">Theories</a>
*
* @since 4.4
*/
public class Assume {
-
- /**
- * Do not instantiate.
- * @deprecated since 4.13.
- */
- @Deprecated
- public Assume() {
- }
-
/**
* If called with an expression evaluating to {@code false}, the test will halt and be ignored.
*/
@@ -54,7 +45,7 @@ public class Assume {
* The inverse of {@link #assumeTrue(boolean)}.
*/
public static void assumeFalse(boolean b) {
- assumeThat(b, is(false));
+ assumeTrue(!b);
}
/**
@@ -76,11 +67,9 @@ public class Assume {
}
/**
- * If called with a {@code null} array or one or more {@code null} elements in {@code objects},
- * the test will halt and be ignored.
+ * If called with one or more null elements in <code>objects</code>, the test will halt and be ignored.
*/
public static void assumeNotNull(Object... objects) {
- assumeThat(objects, notNullValue());
assumeThat(asList(objects), everyItem(notNullValue()));
}