aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/runners/JUnit4.java
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2016-12-14 11:13:37 +0000
committerPaul Duffin <paulduffin@google.com>2016-12-15 18:53:12 +0000
commit4dd042caba6f0ee54f604a409df7152b3e8205bb (patch)
treefd9aa7f11b8c8f927c9e98fd828e60086895ca5e /src/main/java/org/junit/runners/JUnit4.java
parent50db5f5810104e1dd0b0294145e9d3e602bb2627 (diff)
downloadjunit-4dd042caba6f0ee54f604a409df7152b3e8205bb.tar.gz
Moved source to match upstream file structure
Will make it simpler to update JUnit source. Bug: 33613916 Test: make checkbuild Change-Id: I76984a6defd3e40f34eea995e6ed865d32d53da3
Diffstat (limited to 'src/main/java/org/junit/runners/JUnit4.java')
-rw-r--r--src/main/java/org/junit/runners/JUnit4.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/org/junit/runners/JUnit4.java b/src/main/java/org/junit/runners/JUnit4.java
new file mode 100644
index 0000000..1e1f347
--- /dev/null
+++ b/src/main/java/org/junit/runners/JUnit4.java
@@ -0,0 +1,22 @@
+package org.junit.runners;
+
+import org.junit.runners.model.InitializationError;
+
+/**
+ * Aliases the current default JUnit 4 class runner, for future-proofing. If
+ * future versions of JUnit change the default Runner class, they will also
+ * change the definition of this class. Developers wanting to explicitly tag a
+ * class as a JUnit 4 class should use {@code @RunWith(JUnit4.class)}, not,
+ * for example in JUnit 4.5, {@code @RunWith(BlockJUnit4ClassRunner.class)}.
+ * This is the only way this class should be used--any extension that
+ * depends on the implementation details of this class is likely to break
+ * in future versions.
+ */
+public final class JUnit4 extends BlockJUnit4ClassRunner {
+ /**
+ * Constructs a new instance of the default runner
+ */
+ public JUnit4(Class<?> klass) throws InitializationError {
+ super(klass);
+ }
+}