/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | TimeTest.java | 19 import android.test.suitebuilder.annotation.SmallTest; 20 import android.test.suitebuilder.annotation.Suppress; 184 DateTest test = dayTests[index]; in testNormalize1() local 185 local.set(0, test.minute1, test.hour1, test.day1, test.month1, test.year1); in testNormalize1() 188 local.monthDay += test.offset; in testNormalize1() 190 if (local.year != test.year2 || local.month != test.month2 in testNormalize1() 191 || local.monthDay != test.day2 || local.hour != test.hour2 in testNormalize1() 192 || local.minute != test.minute2) { in testNormalize1() 194 test.year2, test.month2, test.day2, test.hour2, test.minute2); in testNormalize1() 202 local.set(0, test.minute1, test.hour1, test.day1, test.month1, test.year1); in testNormalize1() [all …]
|
/frameworks/base/test-runner/src/android/test/ |
D | TouchUtils.java | 17 package android.test; 46 public static void dragQuarterScreenDown(ActivityInstrumentationTestCase test) { in dragQuarterScreenDown() argument 47 dragQuarterScreenDown(test, test.getActivity()); in dragQuarterScreenDown() 55 public static void dragQuarterScreenDown(InstrumentationTestCase test, Activity activity) { in dragQuarterScreenDown() argument 64 drag(test, x, x, fromY, toY, 4); in dragQuarterScreenDown() 76 public static void dragQuarterScreenUp(ActivityInstrumentationTestCase test) { in dragQuarterScreenUp() argument 77 dragQuarterScreenUp(test, test.getActivity()); in dragQuarterScreenUp() 85 public static void dragQuarterScreenUp(InstrumentationTestCase test, Activity activity) { in dragQuarterScreenUp() argument 94 drag(test, x, x, fromY, toY, 4); in dragQuarterScreenUp() 109 public static void scrollToBottom(ActivityInstrumentationTestCase test, ViewGroup v) { in scrollToBottom() argument [all …]
|
D | TestCaseUtil.java | 17 package android.test; 44 public static List<String> getTestCaseNames(Test test, boolean flatten) { in getTestCaseNames() argument 45 List<Test> tests = (List<Test>) getTests(test, flatten); in getTestCaseNames() 53 public static List<? extends Test> getTests(Test test, boolean flatten) { in getTests() argument 54 return getTests(test, flatten, new HashSet<Class<?>>()); in getTests() 57 private static List<? extends Test> getTests(Test test, boolean flatten, in getTests() argument 60 if (test != null) { in getTests() 68 if (test instanceof TestCase && in getTests() 69 ((TestCase)test).getName() == null) { in getTests() 70 workingTest = invokeSuiteMethodIfPossible(test.getClass(), in getTests() [all …]
|
D | TestPrinter.java | 17 package android.test; 88 private void failed(Test test, Throwable t) { in failed() argument 89 mFailedTests.add(test.toString()); in failed() 90 failed(test.toString(), t); in failed() 93 public void addError(Test test, Throwable t) { in addError() argument 94 failed(test, t); in addError() 97 public void addFailure(Test test, junit.framework.AssertionFailedError t) { in addFailure() argument 98 failed(test, t); in addFailure() 101 public void endTest(Test test) { in endTest() argument 102 finished(test.toString()); in endTest() [all …]
|
D | InstrumentationCoreTestRunner.java | 17 package android.test; 35 import android.test.suitebuilder.TestMethod; 36 import android.test.suitebuilder.annotation.HasAnnotation; 104 public void startTest(Test test) { in getAndroidTestRunner() 105 if (test.getClass() != lastClass) { in getAndroidTestRunner() 106 lastClass = test.getClass(); in getAndroidTestRunner() 107 printMemory(test.getClass()); in getAndroidTestRunner() 111 test.getClass().getClassLoader()); in getAndroidTestRunner() 116 public void endTest(Test test) { in getAndroidTestRunner() 117 if (test instanceof TestCase) { in getAndroidTestRunner() [all …]
|
D | AndroidTestRunner.java | 17 package android.test; 59 public void setTest(Test test) { in setTest() argument 60 setTest(test, test.getClass()); in setTest() 63 private void setTest(Test test, Class<? extends Test> testClass) { in setTest() argument 64 mTestCases = (List<TestCase>) TestCaseUtil.getTests(test, true); in setTest() 66 mTestClassName = TestCaseUtil.getTestName(test); in setTest() 173 private void setContextIfAndroidTestCase(Test test, Context context, Context testContext) { in setContextIfAndroidTestCase() argument 174 if (AndroidTestCase.class.isAssignableFrom(test.getClass())) { in setContextIfAndroidTestCase() 175 ((AndroidTestCase) test).setContext(context); in setContextIfAndroidTestCase() 176 ((AndroidTestCase) test).setTestContext(testContext); in setContextIfAndroidTestCase() [all …]
|
D | TestRunner.java | 17 package android.test; 100 public void startTest(Test test) { in startTest() argument 101 started(test.toString()); in startTest() 110 public void endTest(Test test) { in endTest() argument 111 finished(test.toString()); in endTest() 113 passed(test.toString()); in endTest() 123 public void addError(Test test, Throwable t) { in addError() argument 125 failed(test.toString(), t); in addError() 128 public void addFailure(Test test, junit.framework.AssertionFailedError t) { in addFailure() argument 130 failed(test.toString(), t); in addFailure() [all …]
|
/frameworks/base/docs/html/guide/topics/testing/ |
D | testing_android.jd | 57 <li>{@link android.test.InstrumentationTestRunner}</li> 58 <li>{@link android.test}</li> 59 <li>{@link android.test.mock}</li> 94 provides an architecture and powerful tools that help you test every aspect of your application 102 Android test suites are based on JUnit. You can use plain JUnit to test a class that doesn't 103 call the Android API, or Android's JUnit extensions to test Android components. If you're 104 new to Android testing, you can start with general-purpose test case classes such as {@link 105 android.test.AndroidTestCase} and then go on to use more sophisticated classes. 108 The Android JUnit extensions provide component-specific test case classes. These classes 113 Test suites are contained in test packages that are similar to main application packages, so [all …]
|
D | service_testing.jd | 25 <li>{@link android.test.InstrumentationTestRunner}</li> 26 <li>{@link android.test.ServiceTestCase}</li> 27 <li>{@link android.test.mock.MockApplication}</li> 28 <li>{@link android.test.RenamingDelegatingContext}</li> 55 isolation and provides mock objects. The test case class for Service objects is 56 {@link android.test.ServiceTestCase}. Since the Service class assumes that it is separate 57 from its clients, you can test a Service object without using instrumentation. 76 Most other testing is facilitated by the methods in the {@link android.test.ServiceTestCase} 77 test case class. For example, the {@link android.test.ServiceTestCase#getService()} method 78 returns a handle to the Service under test, which you can test to confirm that the Service is [all …]
|
D | contentprovider_testing.jd | 33 <li>{@link android.test.InstrumentationTestRunner}</li> 34 <li>{@link android.test.ProviderTestCase2}</li> 35 <li>{@link android.test.IsolatedContext}</li> 36 <li>{@link android.test.mock.MockContentResolver}</li> 59 own public providers for use by other applications. If you do, then you should test them 63 This document describes how to test public content providers, although the information is 81 The base test case class for content providers, 82 {@link android.test.ProviderTestCase2}, allows you to test your content provider in an 83 isolated environment. Android mock objects such as {@link android.test.IsolatedContext} and 84 {@link android.test.mock.MockContentResolver} also help provide an isolated test environment. [all …]
|
D | activity_testing.jd | 56 <li>{@link android.test.InstrumentationTestRunner}</li> 57 <li>{@link android.test.ActivityInstrumentationTestCase2}</li> 58 <li>{@link android.test.ActivityUnitTestCase}</li> 90 This document describes how to test activities using instrumentation and other test 97 The activity testing API base class is {@link android.test.InstrumentationTestCase}, 98 which provides instrumentation to the test case subclasses you use for Activities. 105 Lifecycle control: With instrumentation, you can start the activity under test, pause it, 106 and destroy it, using methods provided by the test case classes. 110 Contexts or Applications and use them to run the activity under test. This 111 helps you control the test environment and isolate it from production systems. You can [all …]
|
/frameworks/base/media/libstagefright/codecs/aacdec/ |
D | long_term_prediction.cpp | 379 Int32 test; in long_term_prediction() local 494 test = (Int32) weight * (*(pBuffer++)); in long_term_prediction() 495 *(pPredicted_samples++) = test; in long_term_prediction() 496 max |= (test >> 31) ^ test; in long_term_prediction() 526 test = (Int32) weight * (*(pBuffer++)); in long_term_prediction() 527 *(pPredicted_samples++) = test; in long_term_prediction() 528 max |= (test >> 31) ^ test; in long_term_prediction() 557 test = (Int32)datum * weight; in long_term_prediction() 558 *(pPredicted_samples++) = test; in long_term_prediction() 559 max |= (test >> 31) ^ test; in long_term_prediction()
|
/frameworks/base/test-runner/tests/src/android/test/suitebuilder/ |
D | ListTestCaseNames.java | 17 package android.test.suitebuilder; 32 for (Test test : tests) { in getTestCaseNames() 33 if (test instanceof TestCase) { in getTestCaseNames() 34 testCaseNames.add(((TestCase) test).getName()); in getTestCaseNames() 35 } else if (test instanceof TestSuite) { in getTestCaseNames() 36 testCaseNames.addAll(getTestCaseNames((TestSuite) test)); in getTestCaseNames() 48 for (Test test : tests) { in getTestNames() 49 if (test instanceof TestCase) { in getTestNames() 50 String className = test.getClass().getName(); in getTestNames() 51 String testName = ((TestCase) test).getName(); in getTestNames() [all …]
|
D | InstrumentationTestSuiteBuilderTest.java | 17 package android.test.suitebuilder; 19 import static android.test.suitebuilder.ListTestCaseNames.getTestCaseNames; 20 import android.test.suitebuilder.examples.OuterTest; 21 import android.test.suitebuilder.examples.instrumentation.InstrumentationTest; 80 public void addError(Test test, Throwable t) { in addError() argument 81 errors.add(testName(test)); in addError() 84 public void addFailure(Test test, AssertionFailedError t) { in addFailure() argument 85 failures.add(testName(test)); in addFailure() 88 public void endTest(Test test) { in endTest() argument 91 public void startTest(Test test) { in startTest() argument [all …]
|
D | TestSuiteBuilderTest.java | 17 package android.test.suitebuilder; 20 import static android.test.suitebuilder.ListTestCaseNames.getTestCaseNames; 21 import android.test.suitebuilder.examples.OuterTest; 22 import android.test.suitebuilder.examples.suppress.SuppressedTest; 23 import android.test.suitebuilder.examples.error.ErrorTest; 24 import android.test.suitebuilder.examples.error.FailingTest; 25 import android.test.suitebuilder.examples.nested.Level1Test; 26 import android.test.suitebuilder.examples.nested.nested.Level2Test; 27 import android.test.suitebuilder.examples.simple.SimpleTest; 28 import android.test.suitebuilder.examples.subclass.SubclassTest; [all …]
|
D | UnitTestSuiteBuilderTest.java | 17 package android.test.suitebuilder; 19 import android.test.suitebuilder.examples.instrumentation.InstrumentationTest; 73 public void addError(Test test, Throwable t) { in addError() argument 74 errors.add(testName(test)); in addError() 77 public void addFailure(Test test, AssertionFailedError t) { in addFailure() argument 78 failures.add(testName(test)); in addFailure() 81 public void endTest(Test test) { in endTest() argument 84 public void startTest(Test test) { in startTest() argument 85 testsSeen.add(testName(test)); in startTest() 104 private String testName(Test test) { in testName() argument [all …]
|
/frameworks/base/docs/html/guide/developing/testing/ |
D | testing_eclipse.jd | 33 It lets you quickly create a test project and link it to the application under test. 34 When it creates the test project, it automatically inserts the necessary 35 <code><instrumentation></code> element in the test package's manifest file. 38 It lets you quickly import the classes of the application under test, so that your 42 It lets you create run configurations for your test package and include in 46 It lets you run your test package without leaving Eclipse. ADT builds both the 47 application under test and the test package automatically, installs them if 48 necessary to your device or emulator, runs the test package, and displays the 59 To set up a test environment for your Android application, you must first create a separate 60 project that holds the test code. The new project follows the directory structure [all …]
|
D | testing_otheride.jd | 14 <a href="#CreateTestProject">Creating a test project</a> 17 <a href="#UpdateTestProject">Updating a test project</a> 76 You use the <code>android</code> tool to create test projects. 77 You also use <code>android</code> to convert existing test code into an Android test project, 78 or to add the <code>run-tests</code> Ant target to an existing Android test project. 80 Updating a test project</a>. The <code>run-tests</code> target is described in 83 <h3 id="CreateTestProject">Creating a test project</h3> 85 To create a test project with the <code>android</code> tool, enter: 88 android create test-project -m <main_path> -n <project_name> -p <test_path> 102 Path to the project of the application under test, relative to the test package [all …]
|
/frameworks/base/docs/html/resources/tutorials/testing/ |
D | helloandroid_test.jd | 16 <a href="#CreateTestCaseClassFile">Adding the test case class file</a> 19 <a href="#CreateConstructor">Adding the test case constructor</a> 25 <a href="#CreatePreConditions">Adding a preconditions test</a> 28 <a href="#CreateText">Adding a unit test</a> 31 <a href="#CompleteTest">The finished test case class</a> 57 {@link android.test.ActivityInstrumentationTestCase2} 60 {@link android.test.InstrumentationTestRunner} 71 …It guides you through the process of setting up a test project, adding a test, and running the tes… 72 …Of course, when you are done with this tutorial, you will want to create a test project for your o… 75 …If you'd like to read an overview of the test and instrumentation framework and the core test case… [all …]
|
D | activity_test.jd | 25 <a href="#AddTestCaseClass">Adding the test case class file</a> 28 <a href="#AddConstructor">Adding the test case constructor</a> 34 <a href="#AddPreConditionsTest">Adding an initial conditions test</a> 37 <a href="#AddUITest">Adding a UI test</a> 75 {@link android.test.ActivityInstrumentationTestCase2} 81 {@link android.test.InstrumentationTestRunner} 92 …id application and then leading you step-by-step through the creation of a test application for it. 93 The test application demonstrates these key points: 97 …An Android test is itself an Android application that is linked to the application under test by e… 100 …Instead of Android components, an Android test application contains one or more test cases. Each o… [all …]
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | TouchModeFlexibleAsserts.java | 21 import android.test.InstrumentationTestCase; 22 import android.test.TouchUtils; 36 public static void assertInTouchModeAfterClick(InstrumentationTestCase test, View viewToTouch) { in assertInTouchModeAfterClick() argument 40 TouchUtils.clickView(test, viewToTouch); in assertInTouchModeAfterClick() 48 public static void assertInTouchModeAfterTap(InstrumentationTestCase test, View viewToTouch) { in assertInTouchModeAfterTap() argument 52 TouchUtils.tapView(test, viewToTouch); in assertInTouchModeAfterTap() 60 …public static void assertNotInTouchModeAfterKey(InstrumentationTestCase test, int keyCode, View ch… in assertNotInTouchModeAfterKey() argument 61 test.sendKeys(keyCode); in assertNotInTouchModeAfterKey()
|
D | KeyUtils.java | 21 import android.test.ActivityInstrumentationTestCase; 22 import android.test.InstrumentationTestCase; 45 public static void tapMenuKey(ActivityInstrumentationTestCase test) { in tapMenuKey() argument 46 final Instrumentation inst = test.getInstrumentation(); in tapMenuKey() 58 public static void chordMenuKey(ActivityInstrumentationTestCase test, char shortcutKey) { in chordMenuKey() argument 59 final Instrumentation inst = test.getInstrumentation(); in chordMenuKey() 77 public static void longClick(ActivityInstrumentationTestCase test) { in longClick() argument 78 final Instrumentation inst = test.getInstrumentation(); in longClick()
|
/frameworks/base/test-runner/src/android/test/suitebuilder/ |
D | TestPredicates.java | 17 package android.test.suitebuilder; 19 import android.test.InstrumentationTestCase; 20 import android.test.suitebuilder.annotation.HasAnnotation; 21 import android.test.suitebuilder.annotation.Suppress; 22 import android.test.suitebuilder.annotation.LargeTest; 23 import android.test.suitebuilder.annotation.MediumTest; 24 import android.test.suitebuilder.annotation.SmallTest; 25 import android.test.suitebuilder.annotation.Smoke;
|
D | TestSuiteBuilder.java | 17 package android.test.suitebuilder; 20 import android.test.AndroidTestRunner; 21 import android.test.TestCaseUtil; 25 import static android.test.suitebuilder.TestGrouping.SORT_BY_FULLY_QUALIFIED_NAME; 26 import static android.test.suitebuilder.TestPredicates.REJECT_SUPPRESSED; 182 for (TestMethod test : testGrouping.getTests()) { in build() 183 if (satisfiesAllPredicates(test)) { in build() 184 addTest(test); in build() 251 private boolean satisfiesAllPredicates(TestMethod test) { in satisfiesAllPredicates() argument 253 if (!predicate.apply(test)) { in satisfiesAllPredicates() [all …]
|
/frameworks/base/test-runner/src/junit/runner/ |
D | BaseTestRunner.java | 24 public synchronized void startTest(Test test) { in startTest() argument 25 testStarted(test.toString()); in startTest() 55 public synchronized void endTest(Test test) { in endTest() argument 56 testEnded(test.toString()); in endTest() 59 public synchronized void addError(final Test test, final Throwable t) { in addError() argument 60 testFailed(TestRunListener.STATUS_ERROR, test, t); in addError() 63 public synchronized void addFailure(final Test test, final AssertionFailedError t) { in addFailure() argument 64 testFailed(TestRunListener.STATUS_FAILURE, test, t); in addFailure() 73 public abstract void testFailed(int status, Test test, Throwable t); in testFailed() argument 109 Test test= null; in getTest() local [all …]
|