Home
last modified time | relevance | path

Searched refs:test (Results 1 – 25 of 918) sorted by relevance

12345678910>>...37

/frameworks/base/core/tests/coretests/src/android/text/format/
DTimeTest.java19 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/
DTouchUtils.java17 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 …]
DTestCaseUtil.java17 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 …]
DTestPrinter.java17 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 …]
DInstrumentationCoreTestRunner.java17 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 …]
DTestRunner.java17 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 …]
DAndroidTestRunner.java17 package android.test;
60 public void setTest(Test test) { in setTest() argument
61 setTest(test, test.getClass()); in setTest()
64 private void setTest(Test test, Class<? extends Test> testClass) { in setTest() argument
65 mTestCases = (List<TestCase>) TestCaseUtil.getTests(test, true); in setTest()
67 mTestClassName = TestCaseUtil.getTestName(test); in setTest()
194 private void setContextIfAndroidTestCase(Test test, Context context, Context testContext) { in setContextIfAndroidTestCase() argument
195 if (AndroidTestCase.class.isAssignableFrom(test.getClass())) { in setContextIfAndroidTestCase()
196 ((AndroidTestCase) test).setContext(context); in setContextIfAndroidTestCase()
197 ((AndroidTestCase) test).setTestContext(testContext); in setContextIfAndroidTestCase()
[all …]
/frameworks/base/docs/html/tools/testing/
Dtesting_android.jd57 <li>{@link android.test.InstrumentationTestRunner}</li>
58 <li>{@link android.test}</li>
59 <li>{@link android.test.mock}</li>
90 provides an architecture and powerful tools that help you test every aspect of your application
98 Android test suites are based on JUnit. You can use plain JUnit to test a class that doesn't
99 call the Android API, or Android's JUnit extensions to test Android components. If you're
100 new to Android testing, you can start with general-purpose test case classes such as {@link
101 android.test.AndroidTestCase} and then go on to use more sophisticated classes.
104 The Android JUnit extensions provide component-specific test case classes. These classes
109 Test suites are contained in test packages that are similar to main application packages, so
[all …]
Dtesting_eclipse.jd33 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>&lt;instrumentation&gt;</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 …]
Dtesting_otheride.jd14 <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 &lt;main_path&gt; -n &lt;project_name&gt; -p &lt;test_path&gt;
102 Path to the project of the application under test, relative to the test package
[all …]
Dactivity_test.jd25 <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>
69 {@link android.test.ActivityInstrumentationTestCase2}
75 {@link android.test.InstrumentationTestRunner}
86 …id application and then leading you step-by-step through the creation of a test application for it.
87 The test application demonstrates these key points:
91 …An Android test is itself an Android application that is linked to the application under test by e…
94 …Instead of Android components, an Android test application contains one or more test cases. Each o…
[all …]
Dservice_testing.jd25 <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>
51 isolation and provides mock objects. The test case class for Service objects is
52 {@link android.test.ServiceTestCase}. Since the Service class assumes that it is separate
53 from its clients, you can test a Service object without using instrumentation.
72 Most other testing is facilitated by the methods in the {@link android.test.ServiceTestCase}
73 test case class. For example, the {@link android.test.ServiceTestCase#getService()} method
74 returns a handle to the Service under test, which you can test to confirm that the Service is
[all …]
Dcontentprovider_testing.jd33 <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>
65 own public providers for use by other applications. If you do, then you should test them
69 This document describes how to test public content providers, although the information is
87 The base test case class for content providers,
88 {@link android.test.ProviderTestCase2}, allows you to test your content provider in an
89 isolated environment. Android mock objects such as {@link android.test.IsolatedContext} and
90 {@link android.test.mock.MockContentResolver} also help provide an isolated test environment.
[all …]
Dactivity_testing.jd56 <li>{@link android.test.InstrumentationTestRunner}</li>
57 <li>{@link android.test.ActivityInstrumentationTestCase2}</li>
58 <li>{@link android.test.ActivityUnitTestCase}</li>
86 This document describes how to test activities using instrumentation and other test
93 The activity testing API base class is {@link android.test.InstrumentationTestCase},
94 which provides instrumentation to the test case subclasses you use for Activities.
101 Lifecycle control: With instrumentation, you can start the activity under test, pause it,
102 and destroy it, using methods provided by the test case classes.
106 Contexts or Applications and use them to run the activity under test. This
107 helps you control the test environment and isolate it from production systems. You can
[all …]
/frameworks/av/media/libstagefright/codecs/aacdec/
Dlong_term_prediction.cpp379 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/
DListTestCaseNames.java17 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 …]
DInstrumentationTestSuiteBuilderTest.java17 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 …]
DTestSuiteBuilderTest.java17 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 …]
DUnitTestSuiteBuilderTest.java17 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/core/tests/coretests/src/android/util/
DTouchModeFlexibleAsserts.java21 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()
DKeyUtils.java21 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/
DTestPredicates.java17 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;
DTestSuiteBuilder.java17 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/core/tests/coretests/src/android/text/
DTextUtilsTest.java21 import android.test.MoreAsserts;
23 import android.test.suitebuilder.annotation.LargeTest;
24 import android.test.suitebuilder.annotation.SmallTest;
426 spanned.test(); in testRemoveEmptySpans()
427 spanned.addSpan().test(); in testRemoveEmptySpans()
428 spanned.addSpan().test(); in testRemoveEmptySpans()
429 spanned.addSpan().test(); in testRemoveEmptySpans()
430 spanned.addEmptySpan().test(); in testRemoveEmptySpans()
431 spanned.addSpan().test(); in testRemoveEmptySpans()
432 spanned.addEmptySpan().test(); in testRemoveEmptySpans()
[all …]
/frameworks/base/test-runner/src/junit/runner/
DBaseTestRunner.java38 public synchronized void startTest(Test test) { in startTest() argument
39 testStarted(test.toString()); in startTest()
70 public synchronized void endTest(Test test) { in endTest() argument
71 testEnded(test.toString()); in endTest()
74 public synchronized void addError(final Test test, final Throwable t) { in addError() argument
75 testFailed(TestRunListener.STATUS_ERROR, test, t); in addError()
78 public synchronized void addFailure(final Test test, final AssertionFailedError t) { in addFailure() argument
79 testFailed(TestRunListener.STATUS_FAILURE, test, t); in addFailure()
88 public abstract void testFailed(int status, Test test, Throwable t); in testFailed() argument
124 Test test= null; in getTest() local
[all …]

12345678910>>...37