Skip to content

Commit 2174b69

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Attempt to add clarity to SdkSuppress reference docs.
Fixes #2317 PiperOrigin-RevId: 704311343
1 parent a9629d1 commit 2174b69

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

runner/android_junit_runner/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Exceptions during `@AfterClass` were not being reported via `InstrumentationResultPrinter`.
1010
* Exceptions arising in AndroidJUnitRunner.buildRequest are now handled.
1111
* Assumption failures during a ClassRule or BeforeClass are now reported more consistently via `InstrumentationResultPrinter`
12+
* Clarify SdkSuppress reference docs
1213

1314
**New Features**
1415

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@
2121
import java.lang.annotation.Target;
2222

2323
/**
24-
* Indicates that a specific test or class should or should not be run on certain API levels.
24+
* Indicates that a specific test or class should not be run on certain API levels.
2525
*
26-
* <p>Test(s) will be skipped when executed on android platforms less/more than specified level
27-
* (inclusive) or executed on an android platform whose SDK level is in the excludedSdks list.
26+
* <p>Test(s) will be skipped when executed on Android platforms with SDK API level:
27+
*
28+
* <ul>
29+
* <li>less than specified minSdkVersion OR
30+
* <li>greater than specified maxSdkVersion OR
31+
* <li>in the excludedSdks list.
32+
* </ul>
2833
*
2934
* <p>If {@code @SdkSuppress} is applied at both the class and test method, the test method
3035
* annotation takes precedence, and the class level {@code @SdkSuppress} is ignored.
@@ -36,8 +41,10 @@
3641
int minSdkVersion() default 1;
3742
/** The maximum API level to execute (inclusive) */
3843
int maxSdkVersion() default Integer.MAX_VALUE;
39-
/** The list of SDK versions to exclude */
44+
45+
/** The (additional) list of SDK versions to exclude */
4046
int[] excludedSdks() default {};
47+
4148
/**
4249
* The {@link android.os.Build.VERSION.CODENAME} to execute on. This is intended to be used to run
4350
* on a pre-release SDK, where the {@link android.os.Build.VERSION.SDK_INT} has not yet been

0 commit comments

Comments
 (0)