From 9834e28a9868d8193df5b6ee4634b999079c2a8a Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Fri, 2 Mar 2012 19:23:09 -0800 Subject: Add new test projects. - test for User Library usage - test for test project with library. Change-Id: I49b7d4702937f634a1df907af327a979af09f227 --- .../javaProjectTest/app/res/values/strings.xml | 6 +- testapps/testProjectTest/SUCCESS | 0 testapps/testProjectTest/app/.classpath | 8 +++ testapps/testProjectTest/app/.project | 33 ++++++++++ testapps/testProjectTest/app/AndroidManifest.xml | 23 +++++++ testapps/testProjectTest/app/proguard-project.txt | 20 ++++++ testapps/testProjectTest/app/project.properties | 15 +++++ .../app/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 9397 bytes .../app/res/drawable-ldpi/ic_launcher.png | Bin 0 -> 2729 bytes .../app/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 5237 bytes .../app/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 14383 bytes .../testProjectTest/app/res/values/strings.xml | 6 ++ testapps/testProjectTest/lib/.classpath | 8 +++ testapps/testProjectTest/lib/.project | 33 ++++++++++ testapps/testProjectTest/lib/AndroidManifest.xml | 9 +++ testapps/testProjectTest/lib/proguard-project.txt | 20 ++++++ testapps/testProjectTest/lib/project.properties | 15 +++++ testapps/testProjectTest/lib/res/layout/main.xml | 15 +++++ .../tests/testprojecttest/lib/LibActivity.java | 13 ++++ testapps/testProjectTest/test/.classpath | 9 +++ testapps/testProjectTest/test/.project | 34 ++++++++++ testapps/testProjectTest/test/AndroidManifest.xml | 27 ++++++++ testapps/testProjectTest/test/proguard-project.txt | 20 ++++++ testapps/testProjectTest/test/project.properties | 15 +++++ .../test/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 9397 bytes .../test/res/drawable-ldpi/ic_launcher.png | Bin 0 -> 2729 bytes .../test/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 5237 bytes .../test/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 14383 bytes testapps/testProjectTest/test/res/layout/main.xml | 12 ++++ .../testProjectTest/test/res/values/strings.xml | 7 ++ .../tests/testprojecttest/lib/LibActivityTest.java | 72 +++++++++++++++++++++ .../tests/testprojecttest/test/AllTests.java | 53 +++++++++++++++ testapps/userLibTest/.classpath | 9 +++ testapps/userLibTest/.project | 33 ++++++++++ testapps/userLibTest/AndroidManifest.xml | 15 +++++ testapps/userLibTest/ECLIPSEONLY | 0 testapps/userLibTest/README.txt | 5 ++ testapps/userLibTest/SUCCESS | 0 testapps/userLibTest/jars/basicJar.jar | Bin 0 -> 1813 bytes testapps/userLibTest/proguard-project.txt | 20 ++++++ testapps/userLibTest/project.properties | 14 ++++ .../userLibTest/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 4147 bytes .../userLibTest/res/drawable-ldpi/ic_launcher.png | Bin 0 -> 1723 bytes .../userLibTest/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 2574 bytes testapps/userLibTest/res/layout/main.xml | 15 +++++ testapps/userLibTest/res/values/strings.xml | 4 ++ .../src/com/android/tests/userlibtest/Main.java | 19 ++++++ 47 files changed, 605 insertions(+), 2 deletions(-) create mode 100644 testapps/testProjectTest/SUCCESS create mode 100644 testapps/testProjectTest/app/.classpath create mode 100644 testapps/testProjectTest/app/.project create mode 100644 testapps/testProjectTest/app/AndroidManifest.xml create mode 100644 testapps/testProjectTest/app/proguard-project.txt create mode 100644 testapps/testProjectTest/app/project.properties create mode 100644 testapps/testProjectTest/app/res/drawable-hdpi/ic_launcher.png create mode 100644 testapps/testProjectTest/app/res/drawable-ldpi/ic_launcher.png create mode 100644 testapps/testProjectTest/app/res/drawable-mdpi/ic_launcher.png create mode 100644 testapps/testProjectTest/app/res/drawable-xhdpi/ic_launcher.png create mode 100644 testapps/testProjectTest/app/res/values/strings.xml create mode 100644 testapps/testProjectTest/lib/.classpath create mode 100644 testapps/testProjectTest/lib/.project create mode 100644 testapps/testProjectTest/lib/AndroidManifest.xml create mode 100644 testapps/testProjectTest/lib/proguard-project.txt create mode 100644 testapps/testProjectTest/lib/project.properties create mode 100644 testapps/testProjectTest/lib/res/layout/main.xml create mode 100644 testapps/testProjectTest/lib/src/com/android/tests/testprojecttest/lib/LibActivity.java create mode 100644 testapps/testProjectTest/test/.classpath create mode 100644 testapps/testProjectTest/test/.project create mode 100644 testapps/testProjectTest/test/AndroidManifest.xml create mode 100644 testapps/testProjectTest/test/proguard-project.txt create mode 100644 testapps/testProjectTest/test/project.properties create mode 100644 testapps/testProjectTest/test/res/drawable-hdpi/ic_launcher.png create mode 100644 testapps/testProjectTest/test/res/drawable-ldpi/ic_launcher.png create mode 100644 testapps/testProjectTest/test/res/drawable-mdpi/ic_launcher.png create mode 100644 testapps/testProjectTest/test/res/drawable-xhdpi/ic_launcher.png create mode 100644 testapps/testProjectTest/test/res/layout/main.xml create mode 100644 testapps/testProjectTest/test/res/values/strings.xml create mode 100644 testapps/testProjectTest/test/src/com/android/tests/testprojecttest/lib/LibActivityTest.java create mode 100644 testapps/testProjectTest/test/src/com/android/tests/testprojecttest/test/AllTests.java create mode 100644 testapps/userLibTest/.classpath create mode 100644 testapps/userLibTest/.project create mode 100644 testapps/userLibTest/AndroidManifest.xml create mode 100644 testapps/userLibTest/ECLIPSEONLY create mode 100644 testapps/userLibTest/README.txt create mode 100644 testapps/userLibTest/SUCCESS create mode 100644 testapps/userLibTest/jars/basicJar.jar create mode 100644 testapps/userLibTest/proguard-project.txt create mode 100644 testapps/userLibTest/project.properties create mode 100644 testapps/userLibTest/res/drawable-hdpi/ic_launcher.png create mode 100644 testapps/userLibTest/res/drawable-ldpi/ic_launcher.png create mode 100644 testapps/userLibTest/res/drawable-mdpi/ic_launcher.png create mode 100644 testapps/userLibTest/res/layout/main.xml create mode 100644 testapps/userLibTest/res/values/strings.xml create mode 100644 testapps/userLibTest/src/com/android/tests/userlibtest/Main.java diff --git a/testapps/javaProjectTest/app/res/values/strings.xml b/testapps/javaProjectTest/app/res/values/strings.xml index 96d8724..705a565 100644 --- a/testapps/javaProjectTest/app/res/values/strings.xml +++ b/testapps/javaProjectTest/app/res/values/strings.xml @@ -1,4 +1,6 @@ - basicProjectWithJava - + + javaProjectTest-app + + \ No newline at end of file diff --git a/testapps/testProjectTest/SUCCESS b/testapps/testProjectTest/SUCCESS new file mode 100644 index 0000000..e69de29 diff --git a/testapps/testProjectTest/app/.classpath b/testapps/testProjectTest/app/.classpath new file mode 100644 index 0000000..a4763d1 --- /dev/null +++ b/testapps/testProjectTest/app/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/testapps/testProjectTest/app/.project b/testapps/testProjectTest/app/.project new file mode 100644 index 0000000..344feb8 --- /dev/null +++ b/testapps/testProjectTest/app/.project @@ -0,0 +1,33 @@ + + + testProjectTest-app + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/testapps/testProjectTest/app/AndroidManifest.xml b/testapps/testProjectTest/app/AndroidManifest.xml new file mode 100644 index 0000000..821ae78 --- /dev/null +++ b/testapps/testProjectTest/app/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testapps/testProjectTest/app/proguard-project.txt b/testapps/testProjectTest/app/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/testapps/testProjectTest/app/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/testapps/testProjectTest/app/project.properties b/testapps/testProjectTest/app/project.properties new file mode 100644 index 0000000..60765b6 --- /dev/null +++ b/testapps/testProjectTest/app/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-15 +android.library.reference.1=../lib diff --git a/testapps/testProjectTest/app/res/drawable-hdpi/ic_launcher.png b/testapps/testProjectTest/app/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..96a442e Binary files /dev/null and b/testapps/testProjectTest/app/res/drawable-hdpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/app/res/drawable-ldpi/ic_launcher.png b/testapps/testProjectTest/app/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 0000000..9923872 Binary files /dev/null and b/testapps/testProjectTest/app/res/drawable-ldpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/app/res/drawable-mdpi/ic_launcher.png b/testapps/testProjectTest/app/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..359047d Binary files /dev/null and b/testapps/testProjectTest/app/res/drawable-mdpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/app/res/drawable-xhdpi/ic_launcher.png b/testapps/testProjectTest/app/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..71c6d76 Binary files /dev/null and b/testapps/testProjectTest/app/res/drawable-xhdpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/app/res/values/strings.xml b/testapps/testProjectTest/app/res/values/strings.xml new file mode 100644 index 0000000..c933032 --- /dev/null +++ b/testapps/testProjectTest/app/res/values/strings.xml @@ -0,0 +1,6 @@ + + + + TestProjectTest-app + + \ No newline at end of file diff --git a/testapps/testProjectTest/lib/.classpath b/testapps/testProjectTest/lib/.classpath new file mode 100644 index 0000000..a4763d1 --- /dev/null +++ b/testapps/testProjectTest/lib/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/testapps/testProjectTest/lib/.project b/testapps/testProjectTest/lib/.project new file mode 100644 index 0000000..274b512 --- /dev/null +++ b/testapps/testProjectTest/lib/.project @@ -0,0 +1,33 @@ + + + testProjectTest-lib + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/testapps/testProjectTest/lib/AndroidManifest.xml b/testapps/testProjectTest/lib/AndroidManifest.xml new file mode 100644 index 0000000..f8cc83d --- /dev/null +++ b/testapps/testProjectTest/lib/AndroidManifest.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/testapps/testProjectTest/lib/proguard-project.txt b/testapps/testProjectTest/lib/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/testapps/testProjectTest/lib/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/testapps/testProjectTest/lib/project.properties b/testapps/testProjectTest/lib/project.properties new file mode 100644 index 0000000..36f1594 --- /dev/null +++ b/testapps/testProjectTest/lib/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-15 +android.library=true diff --git a/testapps/testProjectTest/lib/res/layout/main.xml b/testapps/testProjectTest/lib/res/layout/main.xml new file mode 100644 index 0000000..14a9c4b --- /dev/null +++ b/testapps/testProjectTest/lib/res/layout/main.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/testapps/testProjectTest/lib/src/com/android/tests/testprojecttest/lib/LibActivity.java b/testapps/testProjectTest/lib/src/com/android/tests/testprojecttest/lib/LibActivity.java new file mode 100644 index 0000000..7d7f607 --- /dev/null +++ b/testapps/testProjectTest/lib/src/com/android/tests/testprojecttest/lib/LibActivity.java @@ -0,0 +1,13 @@ +package com.android.tests.testprojecttest.lib; + +import android.app.Activity; +import android.os.Bundle; + +public class LibActivity extends Activity { + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + } +} \ No newline at end of file diff --git a/testapps/testProjectTest/test/.classpath b/testapps/testProjectTest/test/.classpath new file mode 100644 index 0000000..9afbc38 --- /dev/null +++ b/testapps/testProjectTest/test/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/testapps/testProjectTest/test/.project b/testapps/testProjectTest/test/.project new file mode 100644 index 0000000..bffbba0 --- /dev/null +++ b/testapps/testProjectTest/test/.project @@ -0,0 +1,34 @@ + + + testProjectTest-test + + + testProjectTest-app + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/testapps/testProjectTest/test/AndroidManifest.xml b/testapps/testProjectTest/test/AndroidManifest.xml new file mode 100644 index 0000000..8ac5dbe --- /dev/null +++ b/testapps/testProjectTest/test/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testapps/testProjectTest/test/proguard-project.txt b/testapps/testProjectTest/test/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/testapps/testProjectTest/test/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/testapps/testProjectTest/test/project.properties b/testapps/testProjectTest/test/project.properties new file mode 100644 index 0000000..4c13b85 --- /dev/null +++ b/testapps/testProjectTest/test/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-15 +tested.project.dir=../app diff --git a/testapps/testProjectTest/test/res/drawable-hdpi/ic_launcher.png b/testapps/testProjectTest/test/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..96a442e Binary files /dev/null and b/testapps/testProjectTest/test/res/drawable-hdpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/test/res/drawable-ldpi/ic_launcher.png b/testapps/testProjectTest/test/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 0000000..9923872 Binary files /dev/null and b/testapps/testProjectTest/test/res/drawable-ldpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/test/res/drawable-mdpi/ic_launcher.png b/testapps/testProjectTest/test/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..359047d Binary files /dev/null and b/testapps/testProjectTest/test/res/drawable-mdpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/test/res/drawable-xhdpi/ic_launcher.png b/testapps/testProjectTest/test/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..71c6d76 Binary files /dev/null and b/testapps/testProjectTest/test/res/drawable-xhdpi/ic_launcher.png differ diff --git a/testapps/testProjectTest/test/res/layout/main.xml b/testapps/testProjectTest/test/res/layout/main.xml new file mode 100644 index 0000000..bc12cd8 --- /dev/null +++ b/testapps/testProjectTest/test/res/layout/main.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/testapps/testProjectTest/test/res/values/strings.xml b/testapps/testProjectTest/test/res/values/strings.xml new file mode 100644 index 0000000..ef42478 --- /dev/null +++ b/testapps/testProjectTest/test/res/values/strings.xml @@ -0,0 +1,7 @@ + + + + Hello World! + TestProjectTest-testTest + + \ No newline at end of file diff --git a/testapps/testProjectTest/test/src/com/android/tests/testprojecttest/lib/LibActivityTest.java b/testapps/testProjectTest/test/src/com/android/tests/testprojecttest/lib/LibActivityTest.java new file mode 100644 index 0000000..9be6f97 --- /dev/null +++ b/testapps/testProjectTest/test/src/com/android/tests/testprojecttest/lib/LibActivityTest.java @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.tests.testprojecttest.lib; + +import android.test.ActivityInstrumentationTestCase2; +import android.test.suitebuilder.annotation.MediumTest; +import android.widget.TextView; + +import com.android.tests.testprojecttest.app.R; + +/** + * An example of an {@link ActivityInstrumentationTestCase2} of a specific activity {@link Focus2}. + * By virtue of extending {@link ActivityInstrumentationTestCase2}, the target activity is automatically + * launched and finished before and after each test. This also extends + * {@link android.test.InstrumentationTestCase}, which provides + * access to methods for sending events to the target activity, such as key and + * touch events. See {@link #sendKeys}. + * + * In general, {@link android.test.InstrumentationTestCase}s and {@link ActivityInstrumentationTestCase2}s + * are heavier weight functional tests available for end to end testing of your + * user interface. When run via a {@link android.test.InstrumentationTestRunner}, + * the necessary {@link android.app.Instrumentation} will be injected for you to + * user via {@link #getInstrumentation} in your tests. + * + * See {@link com.example.android.apis.AllTests} for documentation on running + * all tests and individual tests in this application. + */ +public class LibActivityTest extends ActivityInstrumentationTestCase2 { + + private TextView mTextView; + + /** + * Creates an {@link ActivityInstrumentationTestCase2} that tests the {@link Focus2} activity. + */ + public LibActivityTest() { + super(LibActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + final LibActivity a = getActivity(); + // ensure a valid handle to the activity has been returned + assertNotNull(a); + mTextView = (TextView) a.findViewById(R.id.text); + } + + /** + * The name 'test preconditions' is a convention to signal that if this + * test doesn't pass, the test case was not set up properly and it might + * explain any and all failures in other tests. This is not guaranteed + * to run before other tests, as junit uses reflection to find the tests. + */ + @MediumTest + public void testPreconditions() { + assertNotNull(mTextView); + } +} diff --git a/testapps/testProjectTest/test/src/com/android/tests/testprojecttest/test/AllTests.java b/testapps/testProjectTest/test/src/com/android/tests/testprojecttest/test/AllTests.java new file mode 100644 index 0000000..a77b53c --- /dev/null +++ b/testapps/testProjectTest/test/src/com/android/tests/testprojecttest/test/AllTests.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.tests.testprojecttest.test; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import android.test.suitebuilder.TestSuiteBuilder; + +/** + * A test suite containing all tests for ApiDemos. + * + * To run all suites found in this apk: + * $ adb shell am instrument -w \ + * com.example.android.apis.tests/android.test.InstrumentationTestRunner + * + * To run just this suite from the command line: + * $ adb shell am instrument -w \ + * -e class com.example.android.apis.AllTests \ + * com.example.android.apis.tests/android.test.InstrumentationTestRunner + * + * To run an individual test case, e.g. {@link com.example.android.apis.os.MorseCodeConverterTest}: + * $ adb shell am instrument -w \ + * -e class com.example.android.apis.os.MorseCodeConverterTest \ + * com.example.android.apis.tests/android.test.InstrumentationTestRunner + * + * To run an individual test, e.g. {@link com.example.android.apis.os.MorseCodeConverterTest#testCharacterS()}: + * $ adb shell am instrument -w \ + * -e class com.example.android.apis.os.MorseCodeConverterTest#testCharacterS \ + * com.example.android.apis.tests/android.test.InstrumentationTestRunner + */ +public class AllTests extends TestSuite { + + public static Test suite() { + return new TestSuiteBuilder(AllTests.class) + .includeAllPackagesUnderHere() + .build(); + } +} diff --git a/testapps/userLibTest/.classpath b/testapps/userLibTest/.classpath new file mode 100644 index 0000000..132d8c9 --- /dev/null +++ b/testapps/userLibTest/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/testapps/userLibTest/.project b/testapps/userLibTest/.project new file mode 100644 index 0000000..226edb7 --- /dev/null +++ b/testapps/userLibTest/.project @@ -0,0 +1,33 @@ + + + userLibTest + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/testapps/userLibTest/AndroidManifest.xml b/testapps/userLibTest/AndroidManifest.xml new file mode 100644 index 0000000..5883607 --- /dev/null +++ b/testapps/userLibTest/AndroidManifest.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/testapps/userLibTest/ECLIPSEONLY b/testapps/userLibTest/ECLIPSEONLY new file mode 100644 index 0000000..e69de29 diff --git a/testapps/userLibTest/README.txt b/testapps/userLibTest/README.txt new file mode 100644 index 0000000..5d63f4e --- /dev/null +++ b/testapps/userLibTest/README.txt @@ -0,0 +1,5 @@ +This test requires a workspace setup: + +- Create User Library called "USERLIBTEST" +- Add to this library the jar located in jars/basicJar.jar +- App should compile, and deploy on device and UI show show SUCCESS \ No newline at end of file diff --git a/testapps/userLibTest/SUCCESS b/testapps/userLibTest/SUCCESS new file mode 100644 index 0000000..e69de29 diff --git a/testapps/userLibTest/jars/basicJar.jar b/testapps/userLibTest/jars/basicJar.jar new file mode 100644 index 0000000..a81b929 Binary files /dev/null and b/testapps/userLibTest/jars/basicJar.jar differ diff --git a/testapps/userLibTest/proguard-project.txt b/testapps/userLibTest/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/testapps/userLibTest/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/testapps/userLibTest/project.properties b/testapps/userLibTest/project.properties new file mode 100644 index 0000000..0840b4a --- /dev/null +++ b/testapps/userLibTest/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-15 diff --git a/testapps/userLibTest/res/drawable-hdpi/ic_launcher.png b/testapps/userLibTest/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..8074c4c Binary files /dev/null and b/testapps/userLibTest/res/drawable-hdpi/ic_launcher.png differ diff --git a/testapps/userLibTest/res/drawable-ldpi/ic_launcher.png b/testapps/userLibTest/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 0000000..1095584 Binary files /dev/null and b/testapps/userLibTest/res/drawable-ldpi/ic_launcher.png differ diff --git a/testapps/userLibTest/res/drawable-mdpi/ic_launcher.png b/testapps/userLibTest/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..a07c69f Binary files /dev/null and b/testapps/userLibTest/res/drawable-mdpi/ic_launcher.png differ diff --git a/testapps/userLibTest/res/layout/main.xml b/testapps/userLibTest/res/layout/main.xml new file mode 100644 index 0000000..3e65644 --- /dev/null +++ b/testapps/userLibTest/res/layout/main.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/testapps/userLibTest/res/values/strings.xml b/testapps/userLibTest/res/values/strings.xml new file mode 100644 index 0000000..549e4ea --- /dev/null +++ b/testapps/userLibTest/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Main + diff --git a/testapps/userLibTest/src/com/android/tests/userlibtest/Main.java b/testapps/userLibTest/src/com/android/tests/userlibtest/Main.java new file mode 100644 index 0000000..b2f1be3 --- /dev/null +++ b/testapps/userLibTest/src/com/android/tests/userlibtest/Main.java @@ -0,0 +1,19 @@ +package com.android.tests.userlibtest; + +import android.app.Activity; +import android.os.Bundle; +import android.widget.TextView; + +import com.android.tests.basicjar.BasicJar; + +public class Main extends Activity { + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + + TextView tv = (TextView) findViewById(R.id.basicJar); + tv.setText("BasicJar: " + BasicJar.getContent()); + } +} -- cgit v1.1