Skip to content

Commit 8e7b420

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Deprecate Suppress in favor of junit Ignore.
@Suppress only served a purpose when the android test runner only supported JUnit3 tests. It is now replaced with the functionally equivalent org.junit.Ignore. PiperOrigin-RevId: 676923486
1 parent 9b5c706 commit 8e7b420

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

runner/android_junit_runner/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
**API Changes**
1818

1919
* Update to minSdkVersion 21
20+
* Deprecate androidx.test.filters.Suppress in favor of org.junit.Ignore
2021

2122
**Breaking API Changes**
2223

runner/android_junit_runner/java/androidx/test/api/current_public.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ package androidx.test.filters {
3737
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface SmallTest {
3838
}
3939

40-
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Suppress {
40+
@Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Suppress {
4141
}
4242

4343
}

runner/android_junit_runner/java/androidx/test/filters/Suppress.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
* href="http://developer.android.com/reference/android/test/suitebuilder/annotation/Suppress.html">
3131
* android.test.suitebuilder.annotation.Suppress</a> and is the recommended way to suppress tests
3232
* written with the AndroidX Test Library.
33+
*
34+
* @deprecated Use {@link org.junit.Ignore} instead.
3335
*/
3436
@Retention(RetentionPolicy.RUNTIME)
3537
@Target({ElementType.METHOD, ElementType.TYPE})
38+
@Deprecated
3639
public @interface Suppress {}

0 commit comments

Comments
 (0)