From e933cedf837d39a713ef44cadfb07f2c1d863652 Mon Sep 17 00:00:00 2001 From: Sundong Ahn Date: Tue, 31 Jul 2018 16:54:41 +0900 Subject: Build android.test.* with java_sdk_library android.test.* are built with java_sdk_library and api files are added by running "make update-api". android.test.base_static is created for allowing to use android.test.base as a static library. Bug:77577799 Test: make -j Test: make checkapi Test: make checkapi fails with a random change in the txt file Test: adb shell cmd package list libraries |\ grep android.test.* And check the android.test.* libraries Merged-In: Ia27612657532e50b077a9c55dbef59ee3ec04b8a Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a --- test-runner/Android.bp | 72 ++--- test-runner/Android.mk | 44 --- test-runner/api/android-test-runner-current.txt | 334 --------------------- test-runner/api/android-test-runner-removed.txt | 0 .../api/apicheck_msg_android_test_runner.txt | 17 -- test-runner/api/current.txt | 334 +++++++++++++++++++++ test-runner/api/removed.txt | 0 test-runner/api/system-current.txt | 0 test-runner/api/system-removed.txt | 0 test-runner/api/test-current.txt | 0 test-runner/api/test-removed.txt | 0 11 files changed, 352 insertions(+), 449 deletions(-) delete mode 100644 test-runner/api/android-test-runner-current.txt delete mode 100644 test-runner/api/android-test-runner-removed.txt delete mode 100644 test-runner/api/apicheck_msg_android_test_runner.txt create mode 100644 test-runner/api/current.txt create mode 100644 test-runner/api/removed.txt create mode 100644 test-runner/api/system-current.txt create mode 100644 test-runner/api/system-removed.txt create mode 100644 test-runner/api/test-current.txt create mode 100644 test-runner/api/test-removed.txt (limited to 'test-runner') diff --git a/test-runner/Android.bp b/test-runner/Android.bp index 2caa6c45f16b..ea615b920df6 100644 --- a/test-runner/Android.bp +++ b/test-runner/Android.bp @@ -16,23 +16,32 @@ // Build the android.test.runner library // ===================================== -java_library { +java_sdk_library { name: "android.test.runner", - installable: true, - // Needs to be consistent with the repackaged version of this make target. - java_version: "1.8", srcs: ["src/**/*.java"], errorprone: { javacflags: ["-Xep:DepAnn:ERROR"], }, - sdk_version: "current", libs: [ "android.test.base", - "android.test.mock.stubs", + "android.test.mock", + ], + stub_only_libs: [ + "android.test.base", + "android.test.mock", ], + api_packages: [ + "android.test", + "android.test.suitebuilder", + "junit.runner", + "junit.textui", + ], + + droiddoc_options: ["stubsourceonly"], + compile_dex: true } // Build the android.test.runner-minus-junit library @@ -46,8 +55,8 @@ java_library { sdk_version: "current", libs: [ - "android.test.base", - "android.test.mock.stubs", + "android.test.base_static", + "android.test.mock", "junit", ], } @@ -70,7 +79,7 @@ java_library_static { sdk_version: "current", libs: [ - "android.test.base", + "android.test.base_static", ], jarjar_rules: "jarjar-rules.txt", @@ -78,48 +87,3 @@ java_library_static { java_version: "1.8", } -droiddoc { - name: "android-test-runner-api-stubs-gen-docs", - srcs: [ - "src/**/*.java", - ], - libs: [ - "core-oj", - "core-libart", - "framework", - "android.test.base", - "android.test.mock", - ], - custom_template: "droiddoc-templates-sdk", - installable: false, - args: "-stubpackages android.test:" + - "android.test.suitebuilder:" + - "junit.runner:" + - "junit.textui -stubsourceonly -nodocs", - api_tag_name: "ANDROID_TEST_RUNNER", - api_filename: "android-test-runner-current.txt", - removed_api_filename: "android-test-runner-removed.txt", -} - -// Build the android.test.runner.stubs library -// ========================================= -java_library_static { - name: "android.test.runner.stubs", - srcs: [ - ":android-test-runner-api-stubs-gen-docs", - ], - libs: [ - "android.test.base.stubs", - "android.test.mock.stubs", - ], - product_variables: { - pdk: { - enabled: false, - }, - unbundled_build: { - enabled: false, - }, - }, - sdk_version: "current", - compile_dex: true, -} diff --git a/test-runner/Android.mk b/test-runner/Android.mk index b70d2498d491..18bde8517351 100644 --- a/test-runner/Android.mk +++ b/test-runner/Android.mk @@ -16,49 +16,5 @@ LOCAL_PATH:= $(call my-dir) -# For unbundled build we'll use the prebuilt jar from prebuilts/sdk. -ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK))) - -ANDROID_TEST_RUNNER_API_FILE := $(LOCAL_PATH)/api/android-test-runner-current.txt -ANDROID_TEST_RUNNER_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-runner-removed.txt - -full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.runner.stubs,,COMMON)/classes.jar -# Archive a copy of the classes.jar in SDK build. -$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.runner.stubs.jar) - -# Check that the android.test.runner.stubs library has not changed -# ================================================================ - -# Check that the API we're building hasn't changed from the not-yet-released -# SDK version. -$(eval $(call check-api, \ - check-android-test-runner-api-current, \ - $(ANDROID_TEST_RUNNER_API_FILE), \ - $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE), \ - $(ANDROID_TEST_RUNNER_REMOVED_API_FILE), \ - $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE), \ - -error 2 -error 3 -error 4 -error 5 -error 6 \ - -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \ - -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \ - -error 25 -error 26 -error 27, \ - cat $(LOCAL_PATH)/api/apicheck_msg_android_test_runner.txt, \ - check-android-test-runner-api, \ - $(OUT_DOCS)/android-test-runner-api-stubs-gen-docs-stubs.srcjar \ - )) - -.PHONY: check-android-test-runner-api -checkapi: check-android-test-runner-api - -.PHONY: update-android-test-runner-api -update-api: update-android-test-runner-api - -update-android-test-runner-api: $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) | $(ACP) - @echo Copying current.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) $(ANDROID_TEST_RUNNER_API_FILE) - @echo Copying removed.txt - $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE) $(ANDROID_TEST_RUNNER_REMOVED_API_FILE) - -endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true - # additionally, build unit tests in a separate .apk include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/test-runner/api/android-test-runner-current.txt b/test-runner/api/android-test-runner-current.txt deleted file mode 100644 index 1170eb53ab7f..000000000000 --- a/test-runner/api/android-test-runner-current.txt +++ /dev/null @@ -1,334 +0,0 @@ -package android.test { - - public abstract deprecated class ActivityInstrumentationTestCase extends android.test.ActivityTestCase { - ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class); - ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class, boolean); - method public T getActivity(); - method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception; - } - - public abstract deprecated class ActivityInstrumentationTestCase2 extends android.test.ActivityTestCase { - ctor public deprecated ActivityInstrumentationTestCase2(java.lang.String, java.lang.Class); - ctor public ActivityInstrumentationTestCase2(java.lang.Class); - method public T getActivity(); - method public void setActivityInitialTouchMode(boolean); - method public void setActivityIntent(android.content.Intent); - } - - public abstract deprecated class ActivityTestCase extends android.test.InstrumentationTestCase { - ctor public ActivityTestCase(); - method protected android.app.Activity getActivity(); - method protected void scrubClass(java.lang.Class) throws java.lang.IllegalAccessException; - method protected void setActivity(android.app.Activity); - } - - public abstract deprecated class ActivityUnitTestCase extends android.test.ActivityTestCase { - ctor public ActivityUnitTestCase(java.lang.Class); - method public T getActivity(); - method public int getFinishedActivityRequest(); - method public int getRequestedOrientation(); - method public android.content.Intent getStartedActivityIntent(); - method public int getStartedActivityRequest(); - method public boolean isFinishCalled(); - method public void setActivityContext(android.content.Context); - method public void setApplication(android.app.Application); - method protected T startActivity(android.content.Intent, android.os.Bundle, java.lang.Object); - } - - public deprecated class AndroidTestRunner extends junit.runner.BaseTestRunner { - ctor public AndroidTestRunner(); - method public void addTestListener(junit.framework.TestListener); - method public void clearTestListeners(); - method protected junit.framework.TestResult createTestResult(); - method public java.util.List getTestCases(); - method public java.lang.String getTestClassName(); - method public junit.framework.TestResult getTestResult(); - method protected java.lang.Class loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException; - method protected void runFailed(java.lang.String); - method public void runTest(); - method public void runTest(junit.framework.TestResult); - method public void setContext(android.content.Context); - method public deprecated void setInstrumentaiton(android.app.Instrumentation); - method public void setInstrumentation(android.app.Instrumentation); - method public void setTest(junit.framework.Test); - method public void setTestClassName(java.lang.String, java.lang.String); - method public void testEnded(java.lang.String); - method public void testFailed(int, junit.framework.Test, java.lang.Throwable); - method public void testStarted(java.lang.String); - } - - public abstract deprecated class ApplicationTestCase extends android.test.AndroidTestCase { - ctor public ApplicationTestCase(java.lang.Class); - method protected final void createApplication(); - method public T getApplication(); - method public android.content.Context getSystemContext(); - method protected final void terminateApplication(); - method public final void testApplicationTestCaseSetUpProperly() throws java.lang.Exception; - } - - public deprecated class AssertionFailedError extends java.lang.Error { - ctor public AssertionFailedError(); - ctor public AssertionFailedError(java.lang.String); - } - - public deprecated class ComparisonFailure extends android.test.AssertionFailedError { - ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String); - } - - public deprecated class InstrumentationTestRunner extends android.app.Instrumentation implements android.test.TestSuiteProvider { - ctor public InstrumentationTestRunner(); - method public junit.framework.TestSuite getAllTests(); - method protected android.test.AndroidTestRunner getAndroidTestRunner(); - method public android.os.Bundle getArguments(); - method public java.lang.ClassLoader getLoader(); - method public junit.framework.TestSuite getTestSuite(); - field public static final java.lang.String REPORT_KEY_NAME_CLASS = "class"; - field public static final java.lang.String REPORT_KEY_NAME_TEST = "test"; - field public static final java.lang.String REPORT_KEY_NUM_CURRENT = "current"; - field public static final java.lang.String REPORT_KEY_NUM_TOTAL = "numtests"; - field public static final java.lang.String REPORT_KEY_STACK = "stack"; - field public static final java.lang.String REPORT_VALUE_ID = "InstrumentationTestRunner"; - field public static final int REPORT_VALUE_RESULT_ERROR = -1; // 0xffffffff - field public static final int REPORT_VALUE_RESULT_FAILURE = -2; // 0xfffffffe - field public static final int REPORT_VALUE_RESULT_OK = 0; // 0x0 - field public static final int REPORT_VALUE_RESULT_START = 1; // 0x1 - } - - public deprecated class IsolatedContext extends android.content.ContextWrapper { - ctor public IsolatedContext(android.content.ContentResolver, android.content.Context); - method public java.util.List getAndClearBroadcastIntents(); - } - - public class LoaderTestCase extends android.test.AndroidTestCase { - ctor public LoaderTestCase(); - method public T getLoaderResultSynchronously(android.content.Loader); - } - - public final deprecated class MoreAsserts { - method public static void assertAssignableFrom(java.lang.Class, java.lang.Object); - method public static void assertAssignableFrom(java.lang.Class, java.lang.Class); - method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String, java.lang.String); - method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String); - method public static void assertContentsInAnyOrder(java.lang.String, java.lang.Iterable, java.lang.Object...); - method public static void assertContentsInAnyOrder(java.lang.Iterable, java.lang.Object...); - method public static void assertContentsInOrder(java.lang.String, java.lang.Iterable, java.lang.Object...); - method public static void assertContentsInOrder(java.lang.Iterable, java.lang.Object...); - method public static void assertEmpty(java.lang.String, java.lang.Iterable); - method public static void assertEmpty(java.lang.Iterable); - method public static void assertEmpty(java.lang.String, java.util.Map); - method public static void assertEmpty(java.util.Map); - method public static void assertEquals(java.lang.String, byte[], byte[]); - method public static void assertEquals(byte[], byte[]); - method public static void assertEquals(java.lang.String, int[], int[]); - method public static void assertEquals(int[], int[]); - method public static void assertEquals(java.lang.String, double[], double[]); - method public static void assertEquals(double[], double[]); - method public static void assertEquals(java.lang.String, java.lang.Object[], java.lang.Object[]); - method public static void assertEquals(java.lang.Object[], java.lang.Object[]); - method public static void assertEquals(java.lang.String, java.util.Set, java.util.Set); - method public static void assertEquals(java.util.Set, java.util.Set); - method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String, java.lang.String); - method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String); - method public static void assertNotContainsRegex(java.lang.String, java.lang.String, java.lang.String); - method public static void assertNotContainsRegex(java.lang.String, java.lang.String); - method public static void assertNotEmpty(java.lang.String, java.lang.Iterable); - method public static void assertNotEmpty(java.lang.Iterable); - method public static void assertNotEmpty(java.lang.String, java.util.Map); - method public static void assertNotEmpty(java.util.Map); - method public static void assertNotEqual(java.lang.String, java.lang.Object, java.lang.Object); - method public static void assertNotEqual(java.lang.Object, java.lang.Object); - method public static void assertNotMatchesRegex(java.lang.String, java.lang.String, java.lang.String); - method public static void assertNotMatchesRegex(java.lang.String, java.lang.String); - method public static void checkEqualsAndHashCodeMethods(java.lang.String, java.lang.Object, java.lang.Object, boolean); - method public static void checkEqualsAndHashCodeMethods(java.lang.Object, java.lang.Object, boolean); - } - - public abstract deprecated class ProviderTestCase extends android.test.InstrumentationTestCase { - ctor public ProviderTestCase(java.lang.Class, java.lang.String); - method public android.test.mock.MockContentResolver getMockContentResolver(); - method public android.test.IsolatedContext getMockContext(); - method public T getProvider(); - method public static android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.Class, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException; - } - - public abstract class ProviderTestCase2 extends android.test.AndroidTestCase { - ctor public ProviderTestCase2(java.lang.Class, java.lang.String); - method public android.test.mock.MockContentResolver getMockContentResolver(); - method public android.test.IsolatedContext getMockContext(); - method public T getProvider(); - method public static android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.String, java.lang.Class, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException; - } - - public deprecated class RenamingDelegatingContext extends android.content.ContextWrapper { - ctor public RenamingDelegatingContext(android.content.Context, java.lang.String); - ctor public RenamingDelegatingContext(android.content.Context, android.content.Context, java.lang.String); - method public java.lang.String getDatabasePrefix(); - method public void makeExistingFilesAndDbsAccessible(); - method public static T providerWithRenamedContext(java.lang.Class, android.content.Context, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException; - method public static T providerWithRenamedContext(java.lang.Class, android.content.Context, java.lang.String, boolean) throws java.lang.IllegalAccessException, java.lang.InstantiationException; - } - - public abstract deprecated class ServiceTestCase extends android.test.AndroidTestCase { - ctor public ServiceTestCase(java.lang.Class); - method protected android.os.IBinder bindService(android.content.Intent); - method public android.app.Application getApplication(); - method public T getService(); - method public android.content.Context getSystemContext(); - method public void setApplication(android.app.Application); - method protected void setupService(); - method protected void shutdownService(); - method protected void startService(android.content.Intent); - method public void testServiceTestCaseSetUpProperly() throws java.lang.Exception; - } - - public abstract deprecated class SingleLaunchActivityTestCase extends android.test.InstrumentationTestCase { - ctor public SingleLaunchActivityTestCase(java.lang.String, java.lang.Class); - method public T getActivity(); - method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception; - } - - public deprecated class SyncBaseInstrumentation extends android.test.InstrumentationTestCase { - ctor public SyncBaseInstrumentation(); - method protected void cancelSyncsandDisableAutoSync(); - method protected void syncProvider(android.net.Uri, java.lang.String, java.lang.String) throws java.lang.Exception; - } - - public abstract deprecated interface TestSuiteProvider { - method public abstract junit.framework.TestSuite getTestSuite(); - } - - public deprecated class TouchUtils { - ctor public TouchUtils(); - method public static void clickView(android.test.InstrumentationTestCase, android.view.View); - method public static deprecated void drag(android.test.ActivityInstrumentationTestCase, float, float, float, float, int); - method public static void drag(android.test.InstrumentationTestCase, float, float, float, float, int); - method public static deprecated void dragQuarterScreenDown(android.test.ActivityInstrumentationTestCase); - method public static void dragQuarterScreenDown(android.test.InstrumentationTestCase, android.app.Activity); - method public static deprecated void dragQuarterScreenUp(android.test.ActivityInstrumentationTestCase); - method public static void dragQuarterScreenUp(android.test.InstrumentationTestCase, android.app.Activity); - method public static deprecated int dragViewBy(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int); - method public static deprecated int dragViewBy(android.test.InstrumentationTestCase, android.view.View, int, int, int); - method public static deprecated int dragViewTo(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int); - method public static int dragViewTo(android.test.InstrumentationTestCase, android.view.View, int, int, int); - method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View); - method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View); - method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View, int); - method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View, int); - method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View); - method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View, int); - method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View); - method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View, int); - method public static deprecated int dragViewToX(android.test.ActivityInstrumentationTestCase, android.view.View, int, int); - method public static int dragViewToX(android.test.InstrumentationTestCase, android.view.View, int, int); - method public static deprecated int dragViewToY(android.test.ActivityInstrumentationTestCase, android.view.View, int, int); - method public static int dragViewToY(android.test.InstrumentationTestCase, android.view.View, int, int); - method public static deprecated void longClickView(android.test.ActivityInstrumentationTestCase, android.view.View); - method public static void longClickView(android.test.InstrumentationTestCase, android.view.View); - method public static deprecated void scrollToBottom(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup); - method public static void scrollToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup); - method public static deprecated void scrollToTop(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup); - method public static void scrollToTop(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup); - method public static void tapView(android.test.InstrumentationTestCase, android.view.View); - method public static void touchAndCancelView(android.test.InstrumentationTestCase, android.view.View); - } - - public deprecated class ViewAsserts { - method public static void assertBaselineAligned(android.view.View, android.view.View); - method public static void assertBottomAligned(android.view.View, android.view.View); - method public static void assertBottomAligned(android.view.View, android.view.View, int); - method public static void assertGroupContains(android.view.ViewGroup, android.view.View); - method public static void assertGroupIntegrity(android.view.ViewGroup); - method public static void assertGroupNotContains(android.view.ViewGroup, android.view.View); - method public static void assertHasScreenCoordinates(android.view.View, android.view.View, int, int); - method public static void assertHorizontalCenterAligned(android.view.View, android.view.View); - method public static void assertLeftAligned(android.view.View, android.view.View); - method public static void assertLeftAligned(android.view.View, android.view.View, int); - method public static void assertOffScreenAbove(android.view.View, android.view.View); - method public static void assertOffScreenBelow(android.view.View, android.view.View); - method public static void assertOnScreen(android.view.View, android.view.View); - method public static void assertRightAligned(android.view.View, android.view.View); - method public static void assertRightAligned(android.view.View, android.view.View, int); - method public static void assertTopAligned(android.view.View, android.view.View); - method public static void assertTopAligned(android.view.View, android.view.View, int); - method public static void assertVerticalCenterAligned(android.view.View, android.view.View); - } - -} - -package android.test.suitebuilder { - - public deprecated class TestMethod { - ctor public TestMethod(java.lang.reflect.Method, java.lang.Class); - ctor public TestMethod(java.lang.String, java.lang.Class); - ctor public TestMethod(junit.framework.TestCase); - method public junit.framework.TestCase createTest() throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException; - method public T getAnnotation(java.lang.Class); - method public java.lang.Class getEnclosingClass(); - method public java.lang.String getEnclosingClassname(); - method public java.lang.String getName(); - } - - public deprecated class TestSuiteBuilder { - ctor public TestSuiteBuilder(java.lang.Class); - ctor public TestSuiteBuilder(java.lang.String, java.lang.ClassLoader); - method public final junit.framework.TestSuite build(); - method public android.test.suitebuilder.TestSuiteBuilder excludePackages(java.lang.String...); - method protected java.lang.String getSuiteName(); - method public final android.test.suitebuilder.TestSuiteBuilder includeAllPackagesUnderHere(); - method public android.test.suitebuilder.TestSuiteBuilder includePackages(java.lang.String...); - method public android.test.suitebuilder.TestSuiteBuilder named(java.lang.String); - } - - public static deprecated class TestSuiteBuilder.FailedToCreateTests extends junit.framework.TestCase { - ctor public TestSuiteBuilder.FailedToCreateTests(java.lang.Exception); - method public void testSuiteConstructionFailed(); - } - -} - -package junit.runner { - - public abstract class BaseTestRunner implements junit.framework.TestListener { - ctor public BaseTestRunner(); - method public synchronized void addError(junit.framework.Test, java.lang.Throwable); - method public synchronized void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); - method protected void clearStatus(); - method public java.lang.String elapsedTimeAsString(long); - method public synchronized void endTest(junit.framework.Test); - method public java.lang.String extractClassName(java.lang.String); - method public static java.lang.String getFilteredTrace(java.lang.Throwable); - method public static java.lang.String getFilteredTrace(java.lang.String); - method public deprecated junit.runner.TestSuiteLoader getLoader(); - method public static java.lang.String getPreference(java.lang.String); - method public static int getPreference(java.lang.String, int); - method protected static java.util.Properties getPreferences(); - method public junit.framework.Test getTest(java.lang.String); - method public static deprecated boolean inVAJava(); - method protected java.lang.Class loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException; - method protected java.lang.String processArguments(java.lang.String[]); - method protected abstract void runFailed(java.lang.String); - method public static void savePreferences() throws java.io.IOException; - method public void setLoading(boolean); - method public void setPreference(java.lang.String, java.lang.String); - method protected static void setPreferences(java.util.Properties); - method protected static boolean showStackRaw(); - method public synchronized void startTest(junit.framework.Test); - method public abstract void testEnded(java.lang.String); - method public abstract void testFailed(int, junit.framework.Test, java.lang.Throwable); - method public abstract void testStarted(java.lang.String); - method public static java.lang.String truncate(java.lang.String); - method protected boolean useReloadingTestSuiteLoader(); - field public static final java.lang.String SUITE_METHODNAME = "suite"; - } - - public abstract interface TestSuiteLoader { - method public abstract java.lang.Class load(java.lang.String) throws java.lang.ClassNotFoundException; - method public abstract java.lang.Class reload(java.lang.Class) throws java.lang.ClassNotFoundException; - } - - public class Version { - method public static java.lang.String id(); - } - -} - diff --git a/test-runner/api/android-test-runner-removed.txt b/test-runner/api/android-test-runner-removed.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/test-runner/api/apicheck_msg_android_test_runner.txt b/test-runner/api/apicheck_msg_android_test_runner.txt deleted file mode 100644 index cf2d15ee1ee1..000000000000 --- a/test-runner/api/apicheck_msg_android_test_runner.txt +++ /dev/null @@ -1,17 +0,0 @@ - -****************************** -You have tried to change the API from what has been previously approved. - -To make these errors go away, you have two choices: - 1) You can add "@hide" javadoc comments to the methods, etc. listed in the - errors above. - - 2) You can update android-test-runner-current.txt by executing the following command: - make update-android-test-runner-api - - To submit the revised android-test-runner-current.txt to the main Android repository, - you will need approval. -****************************** - - - diff --git a/test-runner/api/current.txt b/test-runner/api/current.txt new file mode 100644 index 000000000000..1170eb53ab7f --- /dev/null +++ b/test-runner/api/current.txt @@ -0,0 +1,334 @@ +package android.test { + + public abstract deprecated class ActivityInstrumentationTestCase extends android.test.ActivityTestCase { + ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class); + ctor public ActivityInstrumentationTestCase(java.lang.String, java.lang.Class, boolean); + method public T getActivity(); + method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception; + } + + public abstract deprecated class ActivityInstrumentationTestCase2 extends android.test.ActivityTestCase { + ctor public deprecated ActivityInstrumentationTestCase2(java.lang.String, java.lang.Class); + ctor public ActivityInstrumentationTestCase2(java.lang.Class); + method public T getActivity(); + method public void setActivityInitialTouchMode(boolean); + method public void setActivityIntent(android.content.Intent); + } + + public abstract deprecated class ActivityTestCase extends android.test.InstrumentationTestCase { + ctor public ActivityTestCase(); + method protected android.app.Activity getActivity(); + method protected void scrubClass(java.lang.Class) throws java.lang.IllegalAccessException; + method protected void setActivity(android.app.Activity); + } + + public abstract deprecated class ActivityUnitTestCase extends android.test.ActivityTestCase { + ctor public ActivityUnitTestCase(java.lang.Class); + method public T getActivity(); + method public int getFinishedActivityRequest(); + method public int getRequestedOrientation(); + method public android.content.Intent getStartedActivityIntent(); + method public int getStartedActivityRequest(); + method public boolean isFinishCalled(); + method public void setActivityContext(android.content.Context); + method public void setApplication(android.app.Application); + method protected T startActivity(android.content.Intent, android.os.Bundle, java.lang.Object); + } + + public deprecated class AndroidTestRunner extends junit.runner.BaseTestRunner { + ctor public AndroidTestRunner(); + method public void addTestListener(junit.framework.TestListener); + method public void clearTestListeners(); + method protected junit.framework.TestResult createTestResult(); + method public java.util.List getTestCases(); + method public java.lang.String getTestClassName(); + method public junit.framework.TestResult getTestResult(); + method protected java.lang.Class loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException; + method protected void runFailed(java.lang.String); + method public void runTest(); + method public void runTest(junit.framework.TestResult); + method public void setContext(android.content.Context); + method public deprecated void setInstrumentaiton(android.app.Instrumentation); + method public void setInstrumentation(android.app.Instrumentation); + method public void setTest(junit.framework.Test); + method public void setTestClassName(java.lang.String, java.lang.String); + method public void testEnded(java.lang.String); + method public void testFailed(int, junit.framework.Test, java.lang.Throwable); + method public void testStarted(java.lang.String); + } + + public abstract deprecated class ApplicationTestCase extends android.test.AndroidTestCase { + ctor public ApplicationTestCase(java.lang.Class); + method protected final void createApplication(); + method public T getApplication(); + method public android.content.Context getSystemContext(); + method protected final void terminateApplication(); + method public final void testApplicationTestCaseSetUpProperly() throws java.lang.Exception; + } + + public deprecated class AssertionFailedError extends java.lang.Error { + ctor public AssertionFailedError(); + ctor public AssertionFailedError(java.lang.String); + } + + public deprecated class ComparisonFailure extends android.test.AssertionFailedError { + ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String); + } + + public deprecated class InstrumentationTestRunner extends android.app.Instrumentation implements android.test.TestSuiteProvider { + ctor public InstrumentationTestRunner(); + method public junit.framework.TestSuite getAllTests(); + method protected android.test.AndroidTestRunner getAndroidTestRunner(); + method public android.os.Bundle getArguments(); + method public java.lang.ClassLoader getLoader(); + method public junit.framework.TestSuite getTestSuite(); + field public static final java.lang.String REPORT_KEY_NAME_CLASS = "class"; + field public static final java.lang.String REPORT_KEY_NAME_TEST = "test"; + field public static final java.lang.String REPORT_KEY_NUM_CURRENT = "current"; + field public static final java.lang.String REPORT_KEY_NUM_TOTAL = "numtests"; + field public static final java.lang.String REPORT_KEY_STACK = "stack"; + field public static final java.lang.String REPORT_VALUE_ID = "InstrumentationTestRunner"; + field public static final int REPORT_VALUE_RESULT_ERROR = -1; // 0xffffffff + field public static final int REPORT_VALUE_RESULT_FAILURE = -2; // 0xfffffffe + field public static final int REPORT_VALUE_RESULT_OK = 0; // 0x0 + field public static final int REPORT_VALUE_RESULT_START = 1; // 0x1 + } + + public deprecated class IsolatedContext extends android.content.ContextWrapper { + ctor public IsolatedContext(android.content.ContentResolver, android.content.Context); + method public java.util.List getAndClearBroadcastIntents(); + } + + public class LoaderTestCase extends android.test.AndroidTestCase { + ctor public LoaderTestCase(); + method public T getLoaderResultSynchronously(android.content.Loader); + } + + public final deprecated class MoreAsserts { + method public static void assertAssignableFrom(java.lang.Class, java.lang.Object); + method public static void assertAssignableFrom(java.lang.Class, java.lang.Class); + method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String, java.lang.String); + method public static java.util.regex.MatchResult assertContainsRegex(java.lang.String, java.lang.String); + method public static void assertContentsInAnyOrder(java.lang.String, java.lang.Iterable, java.lang.Object...); + method public static void assertContentsInAnyOrder(java.lang.Iterable, java.lang.Object...); + method public static void assertContentsInOrder(java.lang.String, java.lang.Iterable, java.lang.Object...); + method public static void assertContentsInOrder(java.lang.Iterable, java.lang.Object...); + method public static void assertEmpty(java.lang.String, java.lang.Iterable); + method public static void assertEmpty(java.lang.Iterable); + method public static void assertEmpty(java.lang.String, java.util.Map); + method public static void assertEmpty(java.util.Map); + method public static void assertEquals(java.lang.String, byte[], byte[]); + method public static void assertEquals(byte[], byte[]); + method public static void assertEquals(java.lang.String, int[], int[]); + method public static void assertEquals(int[], int[]); + method public static void assertEquals(java.lang.String, double[], double[]); + method public static void assertEquals(double[], double[]); + method public static void assertEquals(java.lang.String, java.lang.Object[], java.lang.Object[]); + method public static void assertEquals(java.lang.Object[], java.lang.Object[]); + method public static void assertEquals(java.lang.String, java.util.Set, java.util.Set); + method public static void assertEquals(java.util.Set, java.util.Set); + method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String, java.lang.String); + method public static java.util.regex.MatchResult assertMatchesRegex(java.lang.String, java.lang.String); + method public static void assertNotContainsRegex(java.lang.String, java.lang.String, java.lang.String); + method public static void assertNotContainsRegex(java.lang.String, java.lang.String); + method public static void assertNotEmpty(java.lang.String, java.lang.Iterable); + method public static void assertNotEmpty(java.lang.Iterable); + method public static void assertNotEmpty(java.lang.String, java.util.Map); + method public static void assertNotEmpty(java.util.Map); + method public static void assertNotEqual(java.lang.String, java.lang.Object, java.lang.Object); + method public static void assertNotEqual(java.lang.Object, java.lang.Object); + method public static void assertNotMatchesRegex(java.lang.String, java.lang.String, java.lang.String); + method public static void assertNotMatchesRegex(java.lang.String, java.lang.String); + method public static void checkEqualsAndHashCodeMethods(java.lang.String, java.lang.Object, java.lang.Object, boolean); + method public static void checkEqualsAndHashCodeMethods(java.lang.Object, java.lang.Object, boolean); + } + + public abstract deprecated class ProviderTestCase extends android.test.InstrumentationTestCase { + ctor public ProviderTestCase(java.lang.Class, java.lang.String); + method public android.test.mock.MockContentResolver getMockContentResolver(); + method public android.test.IsolatedContext getMockContext(); + method public T getProvider(); + method public static android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.Class, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException; + } + + public abstract class ProviderTestCase2 extends android.test.AndroidTestCase { + ctor public ProviderTestCase2(java.lang.Class, java.lang.String); + method public android.test.mock.MockContentResolver getMockContentResolver(); + method public android.test.IsolatedContext getMockContext(); + method public T getProvider(); + method public static android.content.ContentResolver newResolverWithContentProviderFromSql(android.content.Context, java.lang.String, java.lang.Class, java.lang.String, java.lang.String, int, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException; + } + + public deprecated class RenamingDelegatingContext extends android.content.ContextWrapper { + ctor public RenamingDelegatingContext(android.content.Context, java.lang.String); + ctor public RenamingDelegatingContext(android.content.Context, android.content.Context, java.lang.String); + method public java.lang.String getDatabasePrefix(); + method public void makeExistingFilesAndDbsAccessible(); + method public static T providerWithRenamedContext(java.lang.Class, android.content.Context, java.lang.String) throws java.lang.IllegalAccessException, java.lang.InstantiationException; + method public static T providerWithRenamedContext(java.lang.Class, android.content.Context, java.lang.String, boolean) throws java.lang.IllegalAccessException, java.lang.InstantiationException; + } + + public abstract deprecated class ServiceTestCase extends android.test.AndroidTestCase { + ctor public ServiceTestCase(java.lang.Class); + method protected android.os.IBinder bindService(android.content.Intent); + method public android.app.Application getApplication(); + method public T getService(); + method public android.content.Context getSystemContext(); + method public void setApplication(android.app.Application); + method protected void setupService(); + method protected void shutdownService(); + method protected void startService(android.content.Intent); + method public void testServiceTestCaseSetUpProperly() throws java.lang.Exception; + } + + public abstract deprecated class SingleLaunchActivityTestCase extends android.test.InstrumentationTestCase { + ctor public SingleLaunchActivityTestCase(java.lang.String, java.lang.Class); + method public T getActivity(); + method public void testActivityTestCaseSetUpProperly() throws java.lang.Exception; + } + + public deprecated class SyncBaseInstrumentation extends android.test.InstrumentationTestCase { + ctor public SyncBaseInstrumentation(); + method protected void cancelSyncsandDisableAutoSync(); + method protected void syncProvider(android.net.Uri, java.lang.String, java.lang.String) throws java.lang.Exception; + } + + public abstract deprecated interface TestSuiteProvider { + method public abstract junit.framework.TestSuite getTestSuite(); + } + + public deprecated class TouchUtils { + ctor public TouchUtils(); + method public static void clickView(android.test.InstrumentationTestCase, android.view.View); + method public static deprecated void drag(android.test.ActivityInstrumentationTestCase, float, float, float, float, int); + method public static void drag(android.test.InstrumentationTestCase, float, float, float, float, int); + method public static deprecated void dragQuarterScreenDown(android.test.ActivityInstrumentationTestCase); + method public static void dragQuarterScreenDown(android.test.InstrumentationTestCase, android.app.Activity); + method public static deprecated void dragQuarterScreenUp(android.test.ActivityInstrumentationTestCase); + method public static void dragQuarterScreenUp(android.test.InstrumentationTestCase, android.app.Activity); + method public static deprecated int dragViewBy(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int); + method public static deprecated int dragViewBy(android.test.InstrumentationTestCase, android.view.View, int, int, int); + method public static deprecated int dragViewTo(android.test.ActivityInstrumentationTestCase, android.view.View, int, int, int); + method public static int dragViewTo(android.test.InstrumentationTestCase, android.view.View, int, int, int); + method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View); + method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View); + method public static deprecated void dragViewToBottom(android.test.ActivityInstrumentationTestCase, android.view.View, int); + method public static void dragViewToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.View, int); + method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View); + method public static deprecated void dragViewToTop(android.test.ActivityInstrumentationTestCase, android.view.View, int); + method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View); + method public static void dragViewToTop(android.test.InstrumentationTestCase, android.view.View, int); + method public static deprecated int dragViewToX(android.test.ActivityInstrumentationTestCase, android.view.View, int, int); + method public static int dragViewToX(android.test.InstrumentationTestCase, android.view.View, int, int); + method public static deprecated int dragViewToY(android.test.ActivityInstrumentationTestCase, android.view.View, int, int); + method public static int dragViewToY(android.test.InstrumentationTestCase, android.view.View, int, int); + method public static deprecated void longClickView(android.test.ActivityInstrumentationTestCase, android.view.View); + method public static void longClickView(android.test.InstrumentationTestCase, android.view.View); + method public static deprecated void scrollToBottom(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup); + method public static void scrollToBottom(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup); + method public static deprecated void scrollToTop(android.test.ActivityInstrumentationTestCase, android.view.ViewGroup); + method public static void scrollToTop(android.test.InstrumentationTestCase, android.app.Activity, android.view.ViewGroup); + method public static void tapView(android.test.InstrumentationTestCase, android.view.View); + method public static void touchAndCancelView(android.test.InstrumentationTestCase, android.view.View); + } + + public deprecated class ViewAsserts { + method public static void assertBaselineAligned(android.view.View, android.view.View); + method public static void assertBottomAligned(android.view.View, android.view.View); + method public static void assertBottomAligned(android.view.View, android.view.View, int); + method public static void assertGroupContains(android.view.ViewGroup, android.view.View); + method public static void assertGroupIntegrity(android.view.ViewGroup); + method public static void assertGroupNotContains(android.view.ViewGroup, android.view.View); + method public static void assertHasScreenCoordinates(android.view.View, android.view.View, int, int); + method public static void assertHorizontalCenterAligned(android.view.View, android.view.View); + method public static void assertLeftAligned(android.view.View, android.view.View); + method public static void assertLeftAligned(android.view.View, android.view.View, int); + method public static void assertOffScreenAbove(android.view.View, android.view.View); + method public static void assertOffScreenBelow(android.view.View, android.view.View); + method public static void assertOnScreen(android.view.View, android.view.View); + method public static void assertRightAligned(android.view.View, android.view.View); + method public static void assertRightAligned(android.view.View, android.view.View, int); + method public static void assertTopAligned(android.view.View, android.view.View); + method public static void assertTopAligned(android.view.View, android.view.View, int); + method public static void assertVerticalCenterAligned(android.view.View, android.view.View); + } + +} + +package android.test.suitebuilder { + + public deprecated class TestMethod { + ctor public TestMethod(java.lang.reflect.Method, java.lang.Class); + ctor public TestMethod(java.lang.String, java.lang.Class); + ctor public TestMethod(junit.framework.TestCase); + method public junit.framework.TestCase createTest() throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException; + method public T getAnnotation(java.lang.Class); + method public java.lang.Class getEnclosingClass(); + method public java.lang.String getEnclosingClassname(); + method public java.lang.String getName(); + } + + public deprecated class TestSuiteBuilder { + ctor public TestSuiteBuilder(java.lang.Class); + ctor public TestSuiteBuilder(java.lang.String, java.lang.ClassLoader); + method public final junit.framework.TestSuite build(); + method public android.test.suitebuilder.TestSuiteBuilder excludePackages(java.lang.String...); + method protected java.lang.String getSuiteName(); + method public final android.test.suitebuilder.TestSuiteBuilder includeAllPackagesUnderHere(); + method public android.test.suitebuilder.TestSuiteBuilder includePackages(java.lang.String...); + method public android.test.suitebuilder.TestSuiteBuilder named(java.lang.String); + } + + public static deprecated class TestSuiteBuilder.FailedToCreateTests extends junit.framework.TestCase { + ctor public TestSuiteBuilder.FailedToCreateTests(java.lang.Exception); + method public void testSuiteConstructionFailed(); + } + +} + +package junit.runner { + + public abstract class BaseTestRunner implements junit.framework.TestListener { + ctor public BaseTestRunner(); + method public synchronized void addError(junit.framework.Test, java.lang.Throwable); + method public synchronized void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); + method protected void clearStatus(); + method public java.lang.String elapsedTimeAsString(long); + method public synchronized void endTest(junit.framework.Test); + method public java.lang.String extractClassName(java.lang.String); + method public static java.lang.String getFilteredTrace(java.lang.Throwable); + method public static java.lang.String getFilteredTrace(java.lang.String); + method public deprecated junit.runner.TestSuiteLoader getLoader(); + method public static java.lang.String getPreference(java.lang.String); + method public static int getPreference(java.lang.String, int); + method protected static java.util.Properties getPreferences(); + method public junit.framework.Test getTest(java.lang.String); + method public static deprecated boolean inVAJava(); + method protected java.lang.Class loadSuiteClass(java.lang.String) throws java.lang.ClassNotFoundException; + method protected java.lang.String processArguments(java.lang.String[]); + method protected abstract void runFailed(java.lang.String); + method public static void savePreferences() throws java.io.IOException; + method public void setLoading(boolean); + method public void setPreference(java.lang.String, java.lang.String); + method protected static void setPreferences(java.util.Properties); + method protected static boolean showStackRaw(); + method public synchronized void startTest(junit.framework.Test); + method public abstract void testEnded(java.lang.String); + method public abstract void testFailed(int, junit.framework.Test, java.lang.Throwable); + method public abstract void testStarted(java.lang.String); + method public static java.lang.String truncate(java.lang.String); + method protected boolean useReloadingTestSuiteLoader(); + field public static final java.lang.String SUITE_METHODNAME = "suite"; + } + + public abstract interface TestSuiteLoader { + method public abstract java.lang.Class load(java.lang.String) throws java.lang.ClassNotFoundException; + method public abstract java.lang.Class reload(java.lang.Class) throws java.lang.ClassNotFoundException; + } + + public class Version { + method public static java.lang.String id(); + } + +} + diff --git a/test-runner/api/removed.txt b/test-runner/api/removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/system-current.txt b/test-runner/api/system-current.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/system-removed.txt b/test-runner/api/system-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/test-current.txt b/test-runner/api/test-current.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-runner/api/test-removed.txt b/test-runner/api/test-removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 -- cgit v1.2.3