Home
last modified time | relevance | path

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

12345678910>>...124

/frameworks/base/tests/net/java/android/net/util/
DDnsUtilsTest.java29 import androidx.test.filters.SmallTest;
30 import androidx.test.runner.AndroidJUnit4;
59 final List<DnsUtils.SortableAddress> test = Arrays.asList( in testRfc6724Comparator() local
93 Collections.sort(test, new DnsUtils.Rfc6724Comparator()); in testRfc6724Comparator()
95 for (int i = 0; i < test.size(); ++i) { in testRfc6724Comparator()
96 assertEquals(test.get(i).address, expected.get(i)); in testRfc6724Comparator()
105 DnsUtils.SortableAddress test = makeSortableAddress("216.58.200.36"); in testV4SortableAddress() local
106 assertEquals(test.hasSrcAddr, 0); in testV4SortableAddress()
107 assertEquals(test.prefixMatchLen, 0); in testV4SortableAddress()
108 assertEquals(test.address, stringToAddress("216.58.200.36")); in testV4SortableAddress()
[all …]
/frameworks/base/tools/aapt2/split/
DTableSplitter_test.cpp27 test::ResourceTableBuilder() in TEST()
30 test::ParseConfigOrDie("mdpi")) in TEST()
33 test::ParseConfigOrDie("hdpi")) in TEST()
36 test::ParseConfigOrDie("xhdpi")) in TEST()
39 test::ParseConfigOrDie("xxhdpi")) in TEST()
48 EXPECT_EQ(nullptr, test::GetValueForConfig<FileReference>( in TEST()
50 test::ParseConfigOrDie("mdpi"))); in TEST()
51 EXPECT_EQ(nullptr, test::GetValueForConfig<FileReference>( in TEST()
53 test::ParseConfigOrDie("hdpi"))); in TEST()
54 EXPECT_NE(nullptr, test::GetValueForConfig<FileReference>( in TEST()
[all …]
/frameworks/base/tools/aapt2/link/
DNoDefaultResourceRemover_test.cpp24 std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build(); in TEST()
26 test::ResourceTableBuilder() in TEST()
29 .AddSimple("android:string/foo", test::ParseConfigOrDie("en-rGB")) in TEST()
30 .AddSimple("android:string/foo", test::ParseConfigOrDie("fr-rFR")) in TEST()
31 .AddSimple("android:string/bar", test::ParseConfigOrDie("en-rGB")) in TEST()
32 .AddSimple("android:string/bar", test::ParseConfigOrDie("fr-rFR")) in TEST()
33 .AddSimple("android:string/bat", test::ParseConfigOrDie("en-rGB-xhdpi")) in TEST()
34 .AddSimple("android:string/bat", test::ParseConfigOrDie("fr-rFR-hdpi")) in TEST()
35 .AddSimple("android:string/baz", test::ParseConfigOrDie("en-rGB")) in TEST()
36 .AddSimple("android:string/baz", test::ParseConfigOrDie("fr-rFR")) in TEST()
[all …]
DProductFilter_test.cpp26 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()
33 test::ParseNameOrDie("android:string/one"), land, "", in TEST()
34 test::ValueBuilder<Id>().SetSource(Source("land/default.xml")).Build(), in TEST()
37 test::ParseNameOrDie("android:string/one"), land, "tablet", in TEST()
38 test::ValueBuilder<Id>().SetSource(Source("land/tablet.xml")).Build(), in TEST()
42 test::ParseNameOrDie("android:string/one"), port, "", in TEST()
43 test::ValueBuilder<Id>().SetSource(Source("port/default.xml")).Build(), in TEST()
46 test::ParseNameOrDie("android:string/one"), port, "tablet", in TEST()
[all …]
DReferenceLinker_test.cpp30 test::ResourceTableBuilder() in TEST()
44 test::ContextBuilder() in TEST()
51 test::StaticSymbolSourceBuilder() in TEST()
59 Reference* ref = test::GetValue<Reference>(table.get(), "com.app.test:string/foo"); in TEST()
64 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/bar"); in TEST()
69 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/baz"); in TEST()
77 test::ResourceTableBuilder() in TEST()
80 test::StyleBuilder() in TEST()
91 Style* style = test::GetValue<Style>(table.get(), "com.app.test:style/Theme"); in TEST()
98 test::ContextBuilder() in TEST()
[all …]
DAutoVersioner_test.cpp29 const ConfigDescription land_config = test::ParseConfigOrDie("land"); in TEST()
30 const ConfigDescription sw600dp_land_config = test::ParseConfigOrDie("sw600dp-land"); in TEST()
42 const ConfigDescription sw600dp_v13_config = test::ParseConfigOrDie("sw600dp-v13"); in TEST()
43 const ConfigDescription v21_config = test::ParseConfigOrDie("v21"); in TEST()
56 test::ResourceTableBuilder() in TEST()
59 "app:style/Foo", test::ParseConfigOrDie("v4"), in TEST()
61 test::StyleBuilder() in TEST()
72 "app:style/Foo", test::ParseConfigOrDie("v21"), in TEST()
74 test::StyleBuilder() in TEST()
80 std::unique_ptr<IAaptContext> context = test::ContextBuilder() in TEST()
[all …]
DResourceExcluder_test.cpp22 using ::aapt::test::HasValue;
45 std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build(); in TEST()
47 auto fr_config = test::ParseConfigOrDie("fr"); in TEST()
50 test::ResourceTableBuilder() in TEST()
63 std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build(); in TEST()
65 auto fr_config = test::ParseConfigOrDie("fr"); in TEST()
68 test::ResourceTableBuilder() in TEST()
81 std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build(); in TEST()
83 auto fr_land_config = test::ParseConfigOrDie("fr-land"); in TEST()
86 test::ResourceTableBuilder() in TEST()
[all …]
DTableMerger_test.cpp23 using ::aapt::test::ValueEq;
39 test::ContextBuilder() in SetUp()
55 test::ResourceTableBuilder() in TEST_F()
61 test::StyleableBuilder().AddItem("com.app.b:id/foo").Build()) in TEST_F()
64 std::unique_ptr<ResourceTable> table_b = test::ResourceTableBuilder() in TEST_F()
78 EXPECT_TRUE(final_table.FindResource(test::ParseNameOrDie("com.app.a:id/foo"))); in TEST_F()
79 EXPECT_TRUE(final_table.FindResource(test::ParseNameOrDie("com.app.a:id/bar"))); in TEST_F()
80 EXPECT_TRUE(final_table.FindResource(test::ParseNameOrDie("com.app.a:styleable/view"))); in TEST_F()
83 EXPECT_FALSE(final_table.FindResource(test::ParseNameOrDie("com.app.b:id/foo"))); in TEST_F()
86 EXPECT_TRUE(final_table.FindResource(test::ParseNameOrDie("com.app.a:id/com.app.b$foo"))); in TEST_F()
[all …]
DXmlReferenceLinker_test.cpp29 context_ = test::ContextBuilder() in SetUp()
33 test::StaticSymbolSourceBuilder() in SetUp()
35 test::AttributeBuilder() in SetUp()
41 test::AttributeBuilder() in SetUp()
45 test::AttributeBuilder().Build()) in SetUp()
47 test::AttributeBuilder() in SetUp()
53 test::AttributeBuilder().Build()) in SetUp()
63 test::AttributeBuilder() in SetUp()
68 test::AttributeBuilder() in SetUp()
72 test::AttributeBuilder().Build()) in SetUp()
[all …]
/frameworks/base/tools/aapt2/filter/
DConfigFilter_test.cpp26 EXPECT_TRUE(filter.Match(test::ParseConfigOrDie("320dpi"))); in TEST()
27 EXPECT_TRUE(filter.Match(test::ParseConfigOrDie("fr"))); in TEST()
32 filter.AddConfig(test::ParseConfigOrDie("fr")); in TEST()
34 EXPECT_TRUE(filter.Match(test::ParseConfigOrDie("320dpi"))); in TEST()
39 filter.AddConfig(test::ParseConfigOrDie("fr")); in TEST()
41 EXPECT_TRUE(filter.Match(test::ParseConfigOrDie("fr"))); in TEST()
46 filter.AddConfig(test::ParseConfigOrDie("fr")); in TEST()
48 EXPECT_TRUE(filter.Match(test::ParseConfigOrDie("fr-320dpi"))); in TEST()
53 filter.AddConfig(test::ParseConfigOrDie("fr-rFR")); in TEST()
54 filter.AddConfig(test::ParseConfigOrDie("sw360dp")); in TEST()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DCompositionTest.cpp265 static void setupPreconditions(CompositionTest* test) { in setupPreconditions()
266 EXPECT_CALL(*test->mComposer, in setupPreconditions()
274 .setCapabilities(&test->mDefaultCapabilities) in setupPreconditions()
276 .inject(&test->mFlinger, test->mComposer); in setupPreconditions()
277 Mock::VerifyAndClear(test->mComposer); in setupPreconditions()
279 EXPECT_CALL(*test->mNativeWindow, query(NATIVE_WINDOW_WIDTH, _)) in setupPreconditions()
281 EXPECT_CALL(*test->mNativeWindow, query(NATIVE_WINDOW_HEIGHT, _)) in setupPreconditions()
283 EXPECT_CALL(*test->mNativeWindow, perform(NATIVE_WINDOW_SET_BUFFERS_FORMAT)).Times(1); in setupPreconditions()
284 EXPECT_CALL(*test->mNativeWindow, perform(NATIVE_WINDOW_API_CONNECT)).Times(1); in setupPreconditions()
285 EXPECT_CALL(*test->mNativeWindow, perform(NATIVE_WINDOW_SET_USAGE64)).Times(1); in setupPreconditions()
[all …]
/frameworks/base/tools/aapt2/optimize/
DVersionCollapser_test.cpp27 test::ResourceTableBuilder builder; in BuildTableWithConfigs()
29 builder.AddSimple(name, test::ParseConfigOrDie(item)); in BuildTableWithConfigs()
36 test::ContextBuilder().SetMinSdkVersion(7).Build(); in TEST()
49 test::GetValueForConfig<Id>(table.get(), res_name, in TEST()
50 test::ParseConfigOrDie("land-v4"))); in TEST()
52 test::GetValueForConfig<Id>(table.get(), res_name, in TEST()
53 test::ParseConfigOrDie("land-v5"))); in TEST()
57 test::GetValueForConfig<Id>(table.get(), res_name, in TEST()
58 test::ParseConfigOrDie("land-v6"))); in TEST()
62 test::GetValueForConfig<Id>(table.get(), res_name, in TEST()
[all …]
DResourceDeduper_test.cpp22 using ::aapt::test::HasValue;
29 std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build(); in TEST()
31 const ConfigDescription ldrtl_config = test::ParseConfigOrDie("ldrtl"); in TEST()
32 const ConfigDescription ldrtl_v21_config = test::ParseConfigOrDie("ldrtl-v21"); in TEST()
33 const ConfigDescription en_config = test::ParseConfigOrDie("en"); in TEST()
34 const ConfigDescription en_v21_config = test::ParseConfigOrDie("en-v21"); in TEST()
36 const ConfigDescription land_config = test::ParseConfigOrDie("land"); in TEST()
39 test::ResourceTableBuilder() in TEST()
67 std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build(); in TEST()
69 const ConfigDescription ldrtl_config = test::ParseConfigOrDie("ldrtl"); in TEST()
[all …]
/frameworks/base/tools/aapt2/
DResourceTable_test.cpp39 test::ParseNameOrDie("android:id/hey,there"), ConfigDescription{}, "", in TEST()
40 test::ValueBuilder<Id>().SetSource("test.xml", 21u).Build(), in TEST()
41 test::GetDiagnostics())); in TEST()
44 test::ParseNameOrDie("android:id/hey:there"), ConfigDescription{}, "", in TEST()
45 test::ValueBuilder<Id>().SetSource("test.xml", 21u).Build(), in TEST()
46 test::GetDiagnostics())); in TEST()
53 test::ParseNameOrDie("android:id/heythere "), ConfigDescription{}, "", in TEST()
54 test::ValueBuilder<Id>().SetSource("test.xml", 21u).Build(), test::GetDiagnostics())); in TEST()
61 test::ParseNameOrDie("android:attr/id"), ConfigDescription{}, "", in TEST()
62 test::ValueBuilder<Id>().SetSource("test/path/file.xml", 23u).Build(), in TEST()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/format/
DTimeTest.java23 import android.platform.test.annotations.Presubmit;
27 import androidx.test.filters.SmallTest;
28 import androidx.test.filters.Suppress;
29 import androidx.test.runner.AndroidJUnit4;
194 DateTest test = dayTests[index]; in testNormalize1() local
195 local.set(0, test.minute1, test.hour1, test.day1, test.month1, test.year1); in testNormalize1()
198 local.monthDay += test.offset; in testNormalize1()
200 if (local.year != test.year2 || local.month != test.month2 in testNormalize1()
201 || local.monthDay != test.day2 || local.hour != test.hour2 in testNormalize1()
202 || local.minute != test.minute2) { in testNormalize1()
[all …]
/frameworks/base/test-runner/api/
Dlint-baseline.txt2 GenericException: android.test.ActivityInstrumentationTestCase#setUp():
4 GenericException: android.test.ActivityInstrumentationTestCase#tearDown():
6 GenericException: android.test.ActivityInstrumentationTestCase2#runTest():
8 GenericException: android.test.ActivityInstrumentationTestCase2#setUp():
10 GenericException: android.test.ActivityInstrumentationTestCase2#tearDown():
12 GenericException: android.test.ActivityUnitTestCase#setUp():
14 GenericException: android.test.ActivityUnitTestCase#tearDown():
16 GenericException: android.test.ApplicationTestCase#setUp():
18 GenericException: android.test.ApplicationTestCase#tearDown():
20 GenericException: android.test.ProviderTestCase#setUp():
[all …]
/frameworks/base/test-runner/src/android/test/
DTouchUtils.java17 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 …]
DTestPrinter.java17 package android.test;
73 private void failed(Test test, Throwable t) { in failed() argument
74 mFailedTests.add(test.toString()); in failed()
75 failed(test.toString(), t); in failed()
78 public void addError(Test test, Throwable t) { in addError() argument
79 failed(test, t); in addError()
82 public void addFailure(Test test, junit.framework.AssertionFailedError t) { in addFailure() argument
83 failed(test, t); in addFailure()
86 public void endTest(Test test) { in endTest() argument
87 finished(test.toString()); in endTest()
[all …]
/frameworks/base/test-runner/
DAndroid.bp17 // Build the android.test.runner library
20 name: "android.test.runner",
29 "android.test.base",
30 "android.test.mock",
33 "android.test.base",
34 "android.test.mock",
37 "android.test",
38 "android.test.suitebuilder",
47 // Build the android.test.runner-minus-junit library
49 // This is only intended for inclusion in the android.test.legacy static
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DDumpUtilsTest.java123 assertFalse(filterRecord(null).test(wcn("com.google.p/abc"))); in testFilterRecord()
124 assertFalse(filterRecord(null).test(wcn("com.android.p/abc"))); in testFilterRecord()
126 assertTrue(filterRecord("all").test(wcn("com.google.p/abc"))); in testFilterRecord()
127 assertTrue(filterRecord("all").test(wcn("com.android.p/abc"))); in testFilterRecord()
128 assertFalse(filterRecord("all").test(wcn(null))); in testFilterRecord()
130 assertFalse(filterRecord("all-platform").test(wcn("com.google.p/abc"))); in testFilterRecord()
131 assertTrue(filterRecord("all-platform").test(wcn("com.android.p/abc"))); in testFilterRecord()
132 assertFalse(filterRecord("all-platform").test(wcn(null))); in testFilterRecord()
134 assertTrue(filterRecord("all-non-platform").test(wcn("com.google.p/abc"))); in testFilterRecord()
135 assertFalse(filterRecord("all-non-platform").test(wcn("com.android.p/abc"))); in testFilterRecord()
[all …]
/frameworks/base/test-base/src/junit/framework/
DTestResult.java40 public synchronized void addError(Test test, Throwable t) { in addError() argument
41 fErrors.add(new TestFailure(test, t)); in addError()
43 each.addError(test, t); in addError()
49 public synchronized void addFailure(Test test, AssertionFailedError t) { in addFailure() argument
50 fFailures.add(new TestFailure(test, t)); in addFailure()
52 each.addFailure(test, t); in addFailure()
77 public void endTest(Test test) { in endTest() argument
79 each.endTest(test); in endTest()
111 protected void run(final TestCase test) { in run() argument
112 startTest(test); in run()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuThreadReaderTest.java28 import android.platform.test.annotations.Presubmit;
30 import androidx.test.InstrumentationRegistry;
31 import androidx.test.filters.SmallTest;
32 import androidx.test.runner.AndroidJUnit4;
301 assertTrue(uidPredicate.test(1000)); in testUidPredicate_singleRange()
302 assertTrue(uidPredicate.test(1050)); in testUidPredicate_singleRange()
303 assertTrue(uidPredicate.test(1999)); in testUidPredicate_singleRange()
304 assertFalse(uidPredicate.test(2000)); in testUidPredicate_singleRange()
305 assertFalse(uidPredicate.test(0)); in testUidPredicate_singleRange()
306 assertFalse(uidPredicate.test(10000)); in testUidPredicate_singleRange()
[all …]
/frameworks/base/test-mock/api/
Dlint-baseline.txt2 ArrayReturn: android.test.mock.MockContentProvider#bulkInsert(android.net.Uri, android.content.Cont…
4 ArrayReturn: android.test.mock.MockResources#getTextArray(int):
8 MissingNullability: android.test.mock.MockApplication#onConfigurationChanged(android.content.res.Co…
10 MissingNullability: android.test.mock.MockContentProvider#attachInfo(android.content.Context, andro…
12 MissingNullability: android.test.mock.MockContentProvider#attachInfo(android.content.Context, andro…
14 MissingNullability: android.test.mock.MockContentProvider#bulkInsert(android.net.Uri, android.conte…
16 MissingNullability: android.test.mock.MockContentProvider#bulkInsert(android.net.Uri, android.conte…
18 MissingNullability: android.test.mock.MockContentProvider#getStreamTypes(android.net.Uri, String):
20 MissingNullability: android.test.mock.MockContentProvider#getStreamTypes(android.net.Uri, String) p…
22 MissingNullability: android.test.mock.MockContentProvider#getStreamTypes(android.net.Uri, String) p…
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DSuggestionsPopupwindowUtils.java19 import static androidx.test.espresso.Espresso.onView;
20 import static androidx.test.espresso.assertion.ViewAssertions.matches;
21 import static androidx.test.espresso.matcher.RootMatchers.withDecorView;
22 import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant;
23 import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
24 import static androidx.test.espresso.matcher.ViewMatchers.withId;
25 import static androidx.test.espresso.matcher.ViewMatchers.withText;
26 import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
30 import androidx.test.espresso.NoMatchingRootException;
31 import androidx.test.espresso.NoMatchingViewException;
[all …]
/frameworks/base/tools/aapt2/process/
DSymbolTable_test.cpp33 test::ResourceTableBuilder() in TEST()
37 test::AttributeBuilder().Build()) in TEST()
41 EXPECT_THAT(symbol_source.FindByName(test::ParseNameOrDie("android:id/foo")), NotNull()); in TEST()
42 EXPECT_THAT(symbol_source.FindByName(test::ParseNameOrDie("android:id/bar")), NotNull()); in TEST()
45 symbol_source.FindByName(test::ParseNameOrDie("android:attr/foo")); in TEST()
52 test::ResourceTableBuilder() in TEST()
54 test::AttributeBuilder().Build()) in TEST()
59 symbol_source.FindByName(test::ParseNameOrDie("android:attr/foo")); in TEST()
66 test::ResourceTableBuilder() in TEST()
75 EXPECT_THAT(symbol_table.FindByName(test::ParseNameOrDie("id/foo")), NotNull()); in TEST()
[all …]

12345678910>>...124