summaryrefslogtreecommitdiff
path: root/ravenwood/junit-stub-src
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@google.com> 2024-01-25 15:00:04 -0700
committer Jeff Sharkey <jsharkey@google.com> 2024-01-26 10:06:18 -0700
commit1a84549be3841f3ad9844067b8cc590e0a68efad (patch)
treef65e390edd2de64bcfd15adbc7923559bcd51761 /ravenwood/junit-stub-src
parenteb64902270ec6805ad82122ff4b2ff19f2b21cec (diff)
Offer `RavenwoodClassRule`.
Some tests interact with yet-unsupported APIs under Ravenwood in their test class constructors, and `RavenwoodRule` arrives too late to effectively apply annotations like `@IgnoreUnderRavenwood`. This change adds `RavenwoodClassRule` which can be marked as an `@ClassRule` so that it runs in a static context before each test class is constructed, giving it a chance to respect annotations. We also adjust our annotation naming to match the naming style in JUnit Jupiter, which has annotations like `DisabledOnJre` and `EnabledOnOs`. Bug: 319647875 Test: atest SystemUiRoboTests Test: atest SystemUiRavenTests Change-Id: I7d834b8e74e961bb3d4befcad6204d99f8fe80e9
Diffstat (limited to 'ravenwood/junit-stub-src')
-rw-r--r--ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java b/ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
index 0ff6a1ad846b..d0c2e18be8df 100644
--- a/ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
+++ b/ravenwood/junit-stub-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
@@ -17,7 +17,7 @@
package android.platform.test.ravenwood;
public class RavenwoodRuleImpl {
- public static boolean isUnderRavenwood() {
+ public static boolean isOnRavenwood() {
return false;
}