xref: /aosp_15_r20/prebuilts/sdk/30/public/api/android.test.base.txt (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1// Signature format: 2.0
2package android.test {
3
4  @Deprecated public class AndroidTestCase extends junit.framework.TestCase {
5    ctor @Deprecated public AndroidTestCase();
6    method @Deprecated public void assertActivityRequiresPermission(String, String, String);
7    method @Deprecated public void assertReadingContentUriRequiresPermission(android.net.Uri, String);
8    method @Deprecated public void assertWritingContentUriRequiresPermission(android.net.Uri, String);
9    method @Deprecated public android.content.Context getContext();
10    method @Deprecated protected void scrubClass(Class<?>) throws java.lang.IllegalAccessException;
11    method @Deprecated public void setContext(android.content.Context);
12    method @Deprecated @android.test.suitebuilder.annotation.Suppress public void testAndroidTestCaseSetupProperly();
13    field @Deprecated protected android.content.Context mContext;
14  }
15
16  @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface FlakyTest {
17    method @Deprecated public abstract int tolerance() default 1;
18  }
19
20  @Deprecated public class InstrumentationTestCase extends junit.framework.TestCase {
21    ctor @Deprecated public InstrumentationTestCase();
22    method @Deprecated public android.app.Instrumentation getInstrumentation();
23    method @Deprecated public void injectInsrumentation(android.app.Instrumentation);
24    method @Deprecated public void injectInstrumentation(android.app.Instrumentation);
25    method @Deprecated public final <T extends android.app.Activity> T launchActivity(String, Class<T>, android.os.Bundle);
26    method @Deprecated public final <T extends android.app.Activity> T launchActivityWithIntent(String, Class<T>, android.content.Intent);
27    method @Deprecated public void runTestOnUiThread(Runnable) throws java.lang.Throwable;
28    method @Deprecated public void sendKeys(String);
29    method @Deprecated public void sendKeys(int...);
30    method @Deprecated public void sendRepeatedKeys(int...);
31  }
32
33  @Deprecated public class InstrumentationTestSuite extends junit.framework.TestSuite {
34    ctor @Deprecated public InstrumentationTestSuite(android.app.Instrumentation);
35    ctor @Deprecated public InstrumentationTestSuite(String, android.app.Instrumentation);
36    ctor @Deprecated public InstrumentationTestSuite(Class, android.app.Instrumentation);
37    method @Deprecated public void addTestSuite(Class);
38  }
39
40  @Deprecated public interface PerformanceTestCase {
41    method @Deprecated public boolean isPerformanceOnly();
42    method @Deprecated public int startPerformance(android.test.PerformanceTestCase.Intermediates);
43  }
44
45  @Deprecated public static interface PerformanceTestCase.Intermediates {
46    method @Deprecated public void addIntermediate(String);
47    method @Deprecated public void addIntermediate(String, long);
48    method @Deprecated public void finishTiming(boolean);
49    method @Deprecated public void setInternalIterations(int);
50    method @Deprecated public void startTiming(boolean);
51  }
52
53  @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface RepetitiveTest {
54    method @Deprecated public abstract int numIterations() default 1;
55  }
56
57  @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface UiThreadTest {
58  }
59
60}
61
62package android.test.suitebuilder.annotation {
63
64  @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 LargeTest {
65  }
66
67  @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 MediumTest {
68  }
69
70  @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 SmallTest {
71  }
72
73  @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 Smoke {
74  }
75
76  @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 {
77  }
78
79}
80
81package com.android.internal.util {
82
83  @Deprecated public interface Predicate<T> {
84    method @Deprecated public boolean apply(T);
85  }
86
87}
88
89package junit.framework {
90
91  public class Assert {
92    ctor protected Assert();
93    method public static void assertEquals(String, Object, Object);
94    method public static void assertEquals(Object, Object);
95    method public static void assertEquals(String, String, String);
96    method public static void assertEquals(String, String);
97    method public static void assertEquals(String, double, double, double);
98    method public static void assertEquals(double, double, double);
99    method public static void assertEquals(String, float, float, float);
100    method public static void assertEquals(float, float, float);
101    method public static void assertEquals(String, long, long);
102    method public static void assertEquals(long, long);
103    method public static void assertEquals(String, boolean, boolean);
104    method public static void assertEquals(boolean, boolean);
105    method public static void assertEquals(String, byte, byte);
106    method public static void assertEquals(byte, byte);
107    method public static void assertEquals(String, char, char);
108    method public static void assertEquals(char, char);
109    method public static void assertEquals(String, short, short);
110    method public static void assertEquals(short, short);
111    method public static void assertEquals(String, int, int);
112    method public static void assertEquals(int, int);
113    method public static void assertFalse(String, boolean);
114    method public static void assertFalse(boolean);
115    method public static void assertNotNull(Object);
116    method public static void assertNotNull(String, Object);
117    method public static void assertNotSame(String, Object, Object);
118    method public static void assertNotSame(Object, Object);
119    method public static void assertNull(Object);
120    method public static void assertNull(String, Object);
121    method public static void assertSame(String, Object, Object);
122    method public static void assertSame(Object, Object);
123    method public static void assertTrue(String, boolean);
124    method public static void assertTrue(boolean);
125    method public static void fail(String);
126    method public static void fail();
127    method public static void failNotEquals(String, Object, Object);
128    method public static void failNotSame(String, Object, Object);
129    method public static void failSame(String);
130    method public static String format(String, Object, Object);
131  }
132
133  public class AssertionFailedError extends java.lang.AssertionError {
134    ctor public AssertionFailedError();
135    ctor public AssertionFailedError(String);
136  }
137
138  public class ComparisonFailure extends junit.framework.AssertionFailedError {
139    ctor public ComparisonFailure(String, String, String);
140    method public String getActual();
141    method public String getExpected();
142  }
143
144  public interface Protectable {
145    method public void protect() throws java.lang.Throwable;
146  }
147
148  public interface Test {
149    method public int countTestCases();
150    method public void run(junit.framework.TestResult);
151  }
152
153  public abstract class TestCase extends junit.framework.Assert implements junit.framework.Test {
154    ctor public TestCase();
155    ctor public TestCase(String);
156    method public int countTestCases();
157    method protected junit.framework.TestResult createResult();
158    method public String getName();
159    method public junit.framework.TestResult run();
160    method public void run(junit.framework.TestResult);
161    method public void runBare() throws java.lang.Throwable;
162    method protected void runTest() throws java.lang.Throwable;
163    method public void setName(String);
164    method protected void setUp() throws java.lang.Exception;
165    method protected void tearDown() throws java.lang.Exception;
166  }
167
168  public class TestFailure {
169    ctor public TestFailure(junit.framework.Test, Throwable);
170    method public String exceptionMessage();
171    method public junit.framework.Test failedTest();
172    method public boolean isFailure();
173    method public Throwable thrownException();
174    method public String trace();
175    field protected junit.framework.Test fFailedTest;
176    field protected Throwable fThrownException;
177  }
178
179  public interface TestListener {
180    method public void addError(junit.framework.Test, Throwable);
181    method public void addFailure(junit.framework.Test, junit.framework.AssertionFailedError);
182    method public void endTest(junit.framework.Test);
183    method public void startTest(junit.framework.Test);
184  }
185
186  public class TestResult {
187    ctor public TestResult();
188    method public void addError(junit.framework.Test, Throwable);
189    method public void addFailure(junit.framework.Test, junit.framework.AssertionFailedError);
190    method public void addListener(junit.framework.TestListener);
191    method public void endTest(junit.framework.Test);
192    method public int errorCount();
193    method public java.util.Enumeration<junit.framework.TestFailure> errors();
194    method public int failureCount();
195    method public java.util.Enumeration<junit.framework.TestFailure> failures();
196    method public void removeListener(junit.framework.TestListener);
197    method protected void run(junit.framework.TestCase);
198    method public int runCount();
199    method public void runProtected(junit.framework.Test, junit.framework.Protectable);
200    method public boolean shouldStop();
201    method public void startTest(junit.framework.Test);
202    method public void stop();
203    method public boolean wasSuccessful();
204    field protected java.util.Vector<junit.framework.TestFailure> fErrors;
205    field protected java.util.Vector<junit.framework.TestFailure> fFailures;
206    field protected java.util.Vector<junit.framework.TestListener> fListeners;
207    field protected int fRunTests;
208  }
209
210  public class TestSuite implements junit.framework.Test {
211    ctor public TestSuite();
212    ctor public TestSuite(Class<?>);
213    ctor public TestSuite(Class<? extends junit.framework.TestCase>, String);
214    ctor public TestSuite(String);
215    ctor public TestSuite(Class<?>...);
216    ctor public TestSuite(Class<? extends junit.framework.TestCase>[], String);
217    method public void addTest(junit.framework.Test);
218    method public void addTestSuite(Class<? extends junit.framework.TestCase>);
219    method public int countTestCases();
220    method public static junit.framework.Test createTest(Class<?>, String);
221    method public String getName();
222    method public static java.lang.reflect.Constructor<?> getTestConstructor(Class<?>) throws java.lang.NoSuchMethodException;
223    method public void run(junit.framework.TestResult);
224    method public void runTest(junit.framework.Test, junit.framework.TestResult);
225    method public void setName(String);
226    method public junit.framework.Test testAt(int);
227    method public int testCount();
228    method public java.util.Enumeration<junit.framework.Test> tests();
229    method public static junit.framework.Test warning(String);
230  }
231
232}
233
234