Skip to content

Commit

Permalink
Deprecate Suppress in favor of junit Ignore.
Browse files Browse the repository at this point in the history
@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
  • Loading branch information
brettchabot authored and copybara-androidxtest committed Sep 20, 2024
1 parent 9b5c706 commit 8e7b420
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions runner/android_junit_runner/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
**API Changes**

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

**Breaking API Changes**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ package androidx.test.filters {
@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 {
}

@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 {
@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 {
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
* href="http://developer.android.com/reference/android/test/suitebuilder/annotation/Suppress.html">
* android.test.suitebuilder.annotation.Suppress</a> and is the recommended way to suppress tests
* written with the AndroidX Test Library.
*
* @deprecated Use {@link org.junit.Ignore} instead.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
@Deprecated
public @interface Suppress {}

0 comments on commit 8e7b420

Please sign in to comment.