/frameworks/base/tools/aapt2/split/ |
D | TableSplitter_test.cpp | 26 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() 28 test::parseConfigOrDie("mdpi")) in TEST() 30 test::parseConfigOrDie("hdpi")) in TEST() 32 test::parseConfigOrDie("xhdpi")) in TEST() 34 test::parseConfigOrDie("xxhdpi")) in TEST() 43 EXPECT_EQ(nullptr, test::getValueForConfig<FileReference>(table.get(), in TEST() 45 test::parseConfigOrDie("mdpi"))); in TEST() 46 EXPECT_EQ(nullptr, test::getValueForConfig<FileReference>(table.get(), in TEST() 48 test::parseConfigOrDie("hdpi"))); in TEST() 49 EXPECT_NE(nullptr, test::getValueForConfig<FileReference>(table.get(), in TEST() [all …]
|
/frameworks/base/tools/aapt2/ |
D | ResourceTable_test.cpp | 37 test::ValueBuilder<Id>().setSource("test.xml", 21u).build(), in TEST() 38 test::getDiagnostics())); in TEST() 43 test::ValueBuilder<Id>().setSource("test.xml", 21u).build(), in TEST() 44 test::getDiagnostics())); in TEST() 50 EXPECT_TRUE(table.addResource(test::parseNameOrDie(u"@android:attr/id"), in TEST() 53 test::ValueBuilder<Id>() in TEST() 55 test::getDiagnostics())); in TEST() 57 ASSERT_NE(nullptr, test::getValue<Id>(&table, u"@android:attr/id")); in TEST() 68 test::parseNameOrDie(u"@android:attr/layout_width"), in TEST() 71 test::ValueBuilder<Id>().setSource("test/path/file.xml", 10u).build(), in TEST() [all …]
|
D | ResourceParser_test.cpp | 33 std::unique_ptr<IAaptContext> context = test::ContextBuilder().build(); in TEST() 47 mContext = test::ContextBuilder().build(); in SetUp() 72 String* str = test::getValue<String>(&mTable, u"@string/foo"); in TEST_F() 81 String* str = test::getValue<String>(&mTable, u"@string/foo"); in TEST_F() 100 String* str = test::getValue<String>(&mTable, u"@string/foo"); in TEST_F() 113 BinaryPrimitive* integer = test::getValue<BinaryPrimitive>(&mTable, u"@integer/foo"); in TEST_F() 123 BinaryPrimitive* integer = test::getValue<BinaryPrimitive>(&mTable, u"@integer/foo"); in TEST_F() 134 Attribute* attr = test::getValue<Attribute>(&mTable, u"@attr/foo"); in TEST_F() 138 attr = test::getValue<Attribute>(&mTable, u"@attr/bar"); in TEST_F() 146 const ConfigDescription watchConfig = test::parseConfigOrDie("watch"); in TEST_F() [all …]
|
/frameworks/base/tools/aapt2/filter/ |
D | ConfigFilter_test.cpp | 27 EXPECT_TRUE(filter.match(test::parseConfigOrDie("320dpi"))); in TEST() 28 EXPECT_TRUE(filter.match(test::parseConfigOrDie("fr"))); in TEST() 33 filter.addConfig(test::parseConfigOrDie("fr")); in TEST() 35 EXPECT_TRUE(filter.match(test::parseConfigOrDie("320dpi"))); in TEST() 40 filter.addConfig(test::parseConfigOrDie("fr")); in TEST() 42 EXPECT_TRUE(filter.match(test::parseConfigOrDie("fr"))); in TEST() 47 filter.addConfig(test::parseConfigOrDie("fr")); in TEST() 49 EXPECT_TRUE(filter.match(test::parseConfigOrDie("fr-320dpi"))); in TEST() 54 filter.addConfig(test::parseConfigOrDie("fr-rFR")); in TEST() 55 filter.addConfig(test::parseConfigOrDie("sw360dp")); in TEST() [all …]
|
/frameworks/base/tools/aapt2/link/ |
D | ProductFilter_test.cpp | 26 std::unique_ptr<IAaptContext> context = test::ContextBuilder().build(); in TEST() 28 const ConfigDescription land = test::parseConfigOrDie("land"); in TEST() 29 const ConfigDescription port = test::parseConfigOrDie("port"); in TEST() 32 ASSERT_TRUE(table.addResource(test::parseNameOrDie(u"@android:string/one"), in TEST() 34 test::ValueBuilder<Id>() in TEST() 37 ASSERT_TRUE(table.addResource(test::parseNameOrDie(u"@android:string/one"), in TEST() 39 test::ValueBuilder<Id>() in TEST() 43 ASSERT_TRUE(table.addResource(test::parseNameOrDie(u"@android:string/one"), in TEST() 45 test::ValueBuilder<Id>() in TEST() 48 ASSERT_TRUE(table.addResource(test::parseNameOrDie(u"@android:string/one"), in TEST() [all …]
|
D | AutoVersioner_test.cpp | 28 const ConfigDescription landConfig = test::parseConfigOrDie("land"); in TEST() 29 const ConfigDescription sw600dpLandConfig = test::parseConfigOrDie("sw600dp-land"); in TEST() 42 const ConfigDescription sw600dpV13Config = test::parseConfigOrDie("sw600dp-v13"); in TEST() 43 const ConfigDescription v21Config = test::parseConfigOrDie("v21"); in TEST() 55 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() 57 .addValue(u"@app:style/Foo", ResourceId(0x7f020000), test::parseConfigOrDie("v4"), in TEST() 58 test::StyleBuilder() in TEST() 68 .addValue(u"@app:style/Foo", ResourceId(0x7f020000), test::parseConfigOrDie("v21"), in TEST() 69 test::StyleBuilder() in TEST() 75 std::unique_ptr<IAaptContext> context = test::ContextBuilder() in TEST() [all …]
|
D | TableMerger_test.cpp | 31 mContext = test::ContextBuilder() in SetUp() 46 std::unique_ptr<ResourceTable> tableA = test::ResourceTableBuilder() in TEST_F() 50 .addValue(u"@com.app.a:styleable/view", test::StyleableBuilder() in TEST_F() 55 std::unique_ptr<ResourceTable> tableB = test::ResourceTableBuilder() in TEST_F() 70 AAPT_EXPECT_TRUE(finalTable.findResource(test::parseNameOrDie(u"@com.app.a:id/foo"))); in TEST_F() 71 AAPT_EXPECT_TRUE(finalTable.findResource(test::parseNameOrDie(u"@com.app.a:id/bar"))); in TEST_F() 72 AAPT_EXPECT_TRUE(finalTable.findResource(test::parseNameOrDie(u"@com.app.a:styleable/view"))); in TEST_F() 75 AAPT_EXPECT_FALSE(finalTable.findResource(test::parseNameOrDie(u"@com.app.b:id/foo"))); in TEST_F() 78 AAPT_EXPECT_TRUE(finalTable.findResource(test::parseNameOrDie(u"@com.app.a:id/com.app.b$foo"))); in TEST_F() 88 fileDesc.config = test::parseConfigOrDie("hdpi-v4"); in TEST_F() [all …]
|
D | ReferenceLinker_test.cpp | 25 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() 37 std::unique_ptr<IAaptContext> context = test::ContextBuilder() in TEST() 42 .addSymbolSource(test::StaticSymbolSourceBuilder() in TEST() 50 Reference* ref = test::getValue<Reference>(table.get(), u"@com.app.test:string/foo"); in TEST() 55 ref = test::getValue<Reference>(table.get(), u"@com.app.test:string/bar"); in TEST() 60 ref = test::getValue<Reference>(table.get(), u"@com.app.test:string/baz"); in TEST() 67 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() 69 .addValue(u"@com.app.test:style/Theme", test::StyleBuilder() in TEST() 79 Style* style = test::getValue<Style>(table.get(), u"@com.app.test:style/Theme"); in TEST() 85 std::unique_ptr<IAaptContext> context = test::ContextBuilder() in TEST() [all …]
|
/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; 52 public static void dragQuarterScreenDown(ActivityInstrumentationTestCase test) { in dragQuarterScreenDown() argument 53 dragQuarterScreenDown(test, test.getActivity()); in dragQuarterScreenDown() 61 public static void dragQuarterScreenDown(InstrumentationTestCase test, Activity activity) { in dragQuarterScreenDown() argument 70 drag(test, x, x, fromY, toY, 4); in dragQuarterScreenDown() 82 public static void dragQuarterScreenUp(ActivityInstrumentationTestCase test) { in dragQuarterScreenUp() argument 83 dragQuarterScreenUp(test, test.getActivity()); in dragQuarterScreenUp() 91 public static void dragQuarterScreenUp(InstrumentationTestCase test, Activity activity) { in dragQuarterScreenUp() argument 100 drag(test, x, x, fromY, toY, 4); in dragQuarterScreenUp() 115 public static void scrollToBottom(ActivityInstrumentationTestCase test, ViewGroup v) { in scrollToBottom() argument [all …]
|
D | TestCaseUtil.java | 17 package android.test; 45 public static List<String> getTestCaseNames(Test test, boolean flatten) { in getTestCaseNames() argument 46 List<Test> tests = (List<Test>) getTests(test, flatten); in getTestCaseNames() 54 public static List<? extends Test> getTests(Test test, boolean flatten) { in getTests() argument 55 return getTests(test, flatten, new HashSet<Class<?>>()); in getTests() 58 private static List<? extends Test> getTests(Test test, boolean flatten, in getTests() argument 61 if (test != null) { in getTests() 69 if (test instanceof TestCase && in getTests() 70 ((TestCase)test).getName() == null) { in getTests() 71 workingTest = invokeSuiteMethodIfPossible(test.getClass(), in getTests() [all …]
|
D | TestPrinter.java | 17 package android.test; 89 private void failed(Test test, Throwable t) { in failed() argument 90 mFailedTests.add(test.toString()); in failed() 91 failed(test.toString(), t); in failed() 94 public void addError(Test test, Throwable t) { in addError() argument 95 failed(test, t); in addError() 98 public void addFailure(Test test, junit.framework.AssertionFailedError t) { in addFailure() argument 99 failed(test, t); in addFailure() 102 public void endTest(Test test) { in endTest() argument 103 finished(test.toString()); in endTest() [all …]
|
D | InstrumentationCoreTestRunner.java | 17 package android.test; 29 import android.test.suitebuilder.TestMethod; 30 import android.test.suitebuilder.annotation.HasAnnotation; 99 public void startTest(Test test) { in getAndroidTestRunner() 100 if (test.getClass() != lastClass) { in getAndroidTestRunner() 101 lastClass = test.getClass(); in getAndroidTestRunner() 102 printMemory(test.getClass()); in getAndroidTestRunner() 106 test.getClass().getClassLoader()); in getAndroidTestRunner() 111 public void endTest(Test test) { in getAndroidTestRunner() 112 if (test instanceof TestCase) { in getAndroidTestRunner() [all …]
|
D | TestRunner.java | 17 package android.test; 101 public void startTest(Test test) { in startTest() argument 102 started(test.toString()); in startTest() 111 public void endTest(Test test) { in endTest() argument 112 finished(test.toString()); in endTest() 114 passed(test.toString()); in endTest() 124 public void addError(Test test, Throwable t) { in addError() argument 126 failed(test.toString(), t); in addError() 129 public void addFailure(Test test, junit.framework.AssertionFailedError t) { in addFailure() argument 131 failed(test.toString(), t); in addFailure() [all …]
|
/frameworks/base/tools/aapt2/compile/ |
D | PseudolocaleGenerator_test.cpp | 76 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() 78 .addString(u"@android:string/two", ResourceId{}, test::parseConfigOrDie("en"), u"two") in TEST() 80 .addString(u"@android:string/three", ResourceId{}, test::parseConfigOrDie("en-rXA"), in TEST() 85 String* val = test::getValue<String>(table.get(), u"@android:string/four"); in TEST() 88 std::unique_ptr<IAaptContext> context = test::ContextBuilder().build(); in TEST() 93 ASSERT_NE(nullptr, test::getValueForConfig<String>(table.get(), u"@android:string/one", in TEST() 94 test::parseConfigOrDie("en-rXA"))); in TEST() 95 ASSERT_NE(nullptr, test::getValueForConfig<String>(table.get(), u"@android:string/one", in TEST() 96 test::parseConfigOrDie("ar-rXB"))); in TEST() 99 ASSERT_EQ(nullptr, test::getValueForConfig<String>(table.get(), u"@android:string/two", in TEST() [all …]
|
/frameworks/base/tools/aapt2/proto/ |
D | TableProtoSerializer_test.cpp | 28 std::unique_ptr<IAaptContext> context = test::ContextBuilder().build(); in TEST() 29 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() 41 ASSERT_TRUE(table->setSymbolState(test::parseNameOrDie(u"@com.app.a:layout/main"), in TEST() 45 Id* id = test::getValue<Id>(table.get(), u"@com.app.a:id/foo"); in TEST() 51 ASSERT_TRUE(table->addResource(test::parseNameOrDie(u"@com.app.a:plurals/hey"), in TEST() 56 ASSERT_TRUE(table->addResource(test::parseNameOrDie(u"@com.app.a:integer/one"), in TEST() 57 test::parseConfigOrDie("land"), std::string(), in TEST() 58 test::buildPrimitive(android::Res_value::TYPE_INT_DEC, 123u), in TEST() 60 ASSERT_TRUE(table->addResource(test::parseNameOrDie(u"@com.app.a:integer/one"), in TEST() 61 test::parseConfigOrDie("land"), std::string("tablet"), in TEST() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/espresso/ |
D | SuggestionsPopupwindowUtils.java | 19 import static android.support.test.espresso.Espresso.onView; 20 import static android.support.test.espresso.assertion.ViewAssertions.matches; 21 import static android.support.test.espresso.matcher.RootMatchers.withDecorView; 22 import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant; 23 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; 24 import static android.support.test.espresso.matcher.ViewMatchers.withId; 25 import static android.support.test.espresso.matcher.ViewMatchers.withText; 29 import android.support.test.espresso.NoMatchingRootException; 30 import android.support.test.espresso.NoMatchingViewException; 31 import android.support.test.espresso.UiController; [all …]
|
D | ContextMenuUtils.java | 19 import static android.support.test.espresso.Espresso.onView; 20 import static android.support.test.espresso.assertion.ViewAssertions.matches; 21 import static android.support.test.espresso.matcher.RootMatchers.withDecorView; 22 import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant; 23 import static android.support.test.espresso.matcher.ViewMatchers.hasFocus; 24 import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom; 25 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; 26 import static android.support.test.espresso.matcher.ViewMatchers.isEnabled; 27 import static android.support.test.espresso.matcher.ViewMatchers.withText; 33 import android.support.test.espresso.NoMatchingRootException; [all …]
|
D | FloatingToolbarEspressoUtils.java | 19 import static android.support.test.espresso.Espresso.onView; 20 import static android.support.test.espresso.action.ViewActions.click; 21 import static android.support.test.espresso.assertion.ViewAssertions.matches; 22 import static android.support.test.espresso.matcher.RootMatchers.withDecorView; 23 import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant; 24 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; 25 import static android.support.test.espresso.matcher.ViewMatchers.isRoot; 26 import static android.support.test.espresso.matcher.ViewMatchers.withTagValue; 27 import static android.support.test.espresso.matcher.ViewMatchers.withId; 28 import static android.support.test.espresso.matcher.ViewMatchers.withText; [all …]
|
D | DragHandleUtils.java | 19 import static android.support.test.espresso.Espresso.onView; 20 import static android.support.test.espresso.assertion.ViewAssertions.matches; 21 import static android.support.test.espresso.matcher.RootMatchers.withDecorView; 22 import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant; 23 import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom; 24 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; 25 import static android.support.test.espresso.matcher.ViewMatchers.withId; 28 import android.support.test.espresso.NoMatchingRootException; 29 import android.support.test.espresso.NoMatchingViewException; 30 import android.support.test.espresso.ViewInteraction;
|
/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 …]
|
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/ |
D | TestResultInstrumentation.java | 20 import android.test.InstrumentationTestRunner; 52 public void addError(Test test, Throwable t) { in addError() argument 54 show("ERROR", test, t); in addError() 58 public void addFailure(Test test, AssertionFailedError t) { in addFailure() argument 60 show("FAIL", test, t); in addFailure() 64 public void endTest(Test test) { in endTest() argument 66 show("PASS", test, null); in endTest() 71 public void startTest(Test test) { in startTest() argument 79 private void show(String tag, Test test, Throwable t) { in show() argument 85 getContext(), String.format("[%s] %s %s", tag, test.toString(), message)); in show()
|
/frameworks/base/docs/html/training/testing/unit-testing/ |
D | instrumented-unit-tests.jd | 2 page.tags=testing,androidjunitrunner,junit,unit test,mock,instrumentation 16 <li><a href="#test-suites">Create a test suite</a></li> 62 you to quickly build and run instrumented test code for your apps. The 63 Testing Support Library includes a JUnit 4 test runner (<a href= 73 to use the test runner and the rules APIs provided by the Testing Support 74 Library. To simplify your test development, you should also include the 87 androidTestCompile 'com.android.support.test:runner:0.5' 88 androidTestCompile 'com.android.support.test:rules:0.5' 92 androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 94 androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' [all …]
|