aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/function
diff options
context:
space:
mode:
authorPete Bentley <prb@google.com>2021-02-24 08:57:22 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-02-24 08:57:22 +0000
commitd1359663578e2a49e74ed74eb10d4b663d58cf3f (patch)
tree1331fa1b743d5d0a341f82ff555ce4c602f40ab9 /src/main/java/org/junit/function
parente938015d2d5a2157ed20eb622fcd9750a12bb4af (diff)
parent7db56fab8af99e12a7644349d14109235ec584b9 (diff)
downloadjunit-d1359663578e2a49e74ed74eb10d4b663d58cf3f.tar.gz
Merge changes I8f5cd126,Ifdb59336,I6abae5ae,I5ec909df
* changes: Remove support for stuck threads Remove DisableOnDebug (new in 4.12) as it is not supported on Android Extra generic type information to aid certain javacs. Upgrade external/junit to 4.13.2
Diffstat (limited to 'src/main/java/org/junit/function')
-rw-r--r--src/main/java/org/junit/function/ThrowingRunnable.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/org/junit/function/ThrowingRunnable.java b/src/main/java/org/junit/function/ThrowingRunnable.java
new file mode 100644
index 0000000..d0eb782
--- /dev/null
+++ b/src/main/java/org/junit/function/ThrowingRunnable.java
@@ -0,0 +1,14 @@
+package org.junit.function;
+
+/**
+ * This interface facilitates the use of
+ * {@link org.junit.Assert#assertThrows(Class, ThrowingRunnable)} from Java 8. It allows method
+ * references to void methods (that declare checked exceptions) to be passed directly into
+ * {@code assertThrows}
+ * without wrapping. It is not meant to be implemented directly.
+ *
+ * @since 4.13
+ */
+public interface ThrowingRunnable {
+ void run() throws Throwable;
+}