/frameworks/base/tools/aapt2/optimize/ |
D | ResourceDeduper_test.cpp | 38 std::unique_ptr<ResourceTable> table = in TEST() local 54 ASSERT_TRUE(ResourceDeduper().Consume(context.get(), table.get())); in TEST() 55 EXPECT_THAT(table, HasValue("android:string/dedupe", default_config)); in TEST() 56 EXPECT_THAT(table, Not(HasValue("android:string/dedupe", ldrtl_config))); in TEST() 57 EXPECT_THAT(table, Not(HasValue("android:string/dedupe", land_config))); in TEST() 59 EXPECT_THAT(table, HasValue("android:string/dedupe2", default_config)); in TEST() 60 EXPECT_THAT(table, HasValue("android:string/dedupe2", ldrtl_v21_config)); in TEST() 61 EXPECT_THAT(table, Not(HasValue("android:string/dedupe2", ldrtl_config))); in TEST() 63 EXPECT_THAT(table, HasValue("android:string/dedupe3", default_config)); in TEST() 64 EXPECT_THAT(table, HasValue("android:string/dedupe3", en_config)); in TEST() [all …]
|
D | VersionCollapser_test.cpp | 40 std::unique_ptr<ResourceTable> table = BuildTableWithConfigs( in TEST() local 45 ASSERT_TRUE(collapser.Consume(context.get(), table.get())); in TEST() 49 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 52 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 57 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 62 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 67 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 70 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 73 test::GetValueForConfig<Id>(table.get(), res_name, in TEST() 83 std::unique_ptr<ResourceTable> table = BuildTableWithConfigs( in TEST() local [all …]
|
D | ResourceFilter_test.cpp | 32 std::unique_ptr<ResourceTable> table = in TEST() local 45 ASSERT_TRUE(ResourceFilter(exclude_list).Consume(context.get(), table.get())); in TEST() 46 EXPECT_THAT(table, HasValue("android:string/notexclude_listed", default_config)); in TEST() 47 EXPECT_THAT(table, HasValue("android:string/notexclude_listed2", default_config)); in TEST() 48 EXPECT_THAT(table, Not(HasValue("android:string/exclude_listed", default_config))); in TEST() 49 EXPECT_THAT(table, Not(HasValue("android:string/exclude_listed2", default_config))); in TEST() 56 std::unique_ptr<ResourceTable> table = in TEST() local 68 ASSERT_TRUE(ResourceFilter(exclude_list).Consume(context.get(), table.get())); in TEST() 69 EXPECT_THAT(table, HasValue("android:string/notexclude_listed", default_config)); in TEST() 70 EXPECT_THAT(table, HasValue("android:drawable/exclude_listed", default_config)); in TEST() [all …]
|
/frameworks/base/libs/androidfw/tests/ |
D | Split_test.cpp | 67 ResTable table; in TEST_F() local 69 table.add(basic_contents_.data(), basic_contents_.size())); in TEST_F() 76 ResTable table; in TEST_F() local 77 table.setParameters(&frenchConfig); in TEST_F() 80 table.add(basic_contents_.data(), basic_contents_.size())); in TEST_F() 87 ssize_t block = table.getResource(R::string::test1, &val, MAY_NOT_BE_BAG, 0, in TEST_F() 105 ResTable table; in TEST_F() local 106 table.setParameters(&expectedConfig); in TEST_F() 109 table.add(basic_contents_.data(), basic_contents_.size())); in TEST_F() 110 ASSERT_EQ(NO_ERROR, table.add(basic_de_fr_contents_.data(), in TEST_F() [all …]
|
D | ResTable_test.cpp | 40 ResTable table; in TEST() local 41 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 49 ResTable table; in TEST() local 50 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 55 table.setParameters(&config); in TEST() 60 table.identifierForName(name.string(), name.size(), nullptr, 0, nullptr, 0, &flags); in TEST() 66 table.getResource(resid, &val, false /*mayBeBag*/, 0u /*density*/, &flags, &selected_config), in TEST() 77 ResTable table; in TEST() local 78 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 80 EXPECT_TRUE(IsStringEqual(table, basic::R::string::test1, "test1")); in TEST() [all …]
|
D | AppAsLib_test.cpp | 34 ResTable table; in TEST() local 35 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 38 ssize_t block = table.getResource(app::R::integer::number1, &val); in TEST() 51 ResTable table; in TEST() local 53 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size(), NULL, 0, -1, in TEST() 57 ssize_t block = table.getResource(lib::R::integer::number1, &val); in TEST() 70 ResTable table; in TEST() local 72 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size(), NULL, 0, -1, in TEST() 76 ssize_t block = table.getResource(lib::R::integer::number1, &val); in TEST()
|
/frameworks/base/tools/aapt2/link/ |
D | ResourceExcluder_test.cpp | 49 std::unique_ptr<ResourceTable> table = in TEST() local 57 ASSERT_TRUE(ResourceExcluder(args).Consume(context.get(), table.get())); in TEST() 58 EXPECT_THAT(table, HasValue("android:string/test", default_config)); in TEST() 59 EXPECT_THAT(table, HasValue("android:string/test", fr_config)); in TEST() 67 std::unique_ptr<ResourceTable> table = in TEST() local 75 ASSERT_TRUE(ResourceExcluder(args).Consume(context.get(), table.get())); in TEST() 76 EXPECT_THAT(table, HasValue("android:string/test", default_config)); in TEST() 77 EXPECT_THAT(table, Not(HasValue("android:string/test", fr_config))); in TEST() 85 std::unique_ptr<ResourceTable> table = in TEST() local 93 ASSERT_TRUE(ResourceExcluder(args).Consume(context.get(), table.get())); in TEST() [all …]
|
D | ProductFilter_test.cpp | 31 ResourceTable table; in TEST() local 32 ASSERT_TRUE(table.AddResource( in TEST() 38 ASSERT_TRUE(table.AddResource( in TEST() 45 ASSERT_TRUE(table.AddResource( in TEST() 51 ASSERT_TRUE(table.AddResource( in TEST() 59 ASSERT_TRUE(filter.Consume(context.get(), &table)); in TEST() 62 &table, "android:string/one", land, "")); in TEST() 64 &table, "android:string/one", land, "tablet")); in TEST() 66 &table, "android:string/one", port, "")); in TEST() 68 &table, "android:string/one", port, "tablet")); in TEST() [all …]
|
D | ReferenceLinker_test.cpp | 29 std::unique_ptr<ResourceTable> table = in TEST() local 48 util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 56 ASSERT_TRUE(linker.Consume(context.get(), table.get())); in TEST() 58 Reference* ref = test::GetValue<Reference>(table.get(), "com.app.test:string/foo"); in TEST() 63 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/bar"); in TEST() 68 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/baz"); in TEST() 75 std::unique_ptr<ResourceTable> table = in TEST() local 89 Style* style = test::GetValue<Style>(table.get(), "com.app.test:style/Theme"); in TEST() 92 util::make_unique<RawString>(table->string_pool.MakeRef("one|two")); in TEST() 118 ASSERT_TRUE(linker.Consume(context.get(), table.get())); in TEST() [all …]
|
D | NoDefaultResourceRemover_test.cpp | 25 std::unique_ptr<ResourceTable> table = in TEST() local 40 ASSERT_TRUE(remover.Consume(context.get(), table.get())); in TEST() 42 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:string/foo"))); in TEST() 43 EXPECT_FALSE(table->FindResource(test::ParseNameOrDie("android:string/bar"))); in TEST() 44 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:string/bat"))); in TEST() 45 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:string/baz"))); in TEST() 51 std::unique_ptr<ResourceTable> table = in TEST() local 65 ASSERT_TRUE(remover.Consume(context.get(), table.get())); in TEST() 67 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:drawable/keep1"))); in TEST() 68 EXPECT_TRUE(table->FindResource(test::ParseNameOrDie("android:drawable/keep2"))); in TEST() [all …]
|
D | PrivateAttributeMover_test.cpp | 26 std::unique_ptr<ResourceTable> table = in TEST() local 39 ASSERT_TRUE(mover.Consume(context.get(), table.get())); in TEST() 41 ResourceTablePackage* package = table->FindPackage("android"); in TEST() 60 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST() local 66 ASSERT_TRUE(mover.Consume(context.get(), table.get())); in TEST() 68 ResourceTablePackage* package = table->FindPackage("android"); in TEST() 81 std::unique_ptr<ResourceTable> table = in TEST() local 87 ResourceTablePackage* package = table->FindPackage("android"); in TEST() 93 ASSERT_TRUE(mover.Consume(context.get(), table.get())); in TEST()
|
/frameworks/base/tools/aapt2/ |
D | ResourceTable_test.cpp | 38 ResourceTable table; in TEST() local 41 table.AddResource(NewResourceBuilder(test::ParseNameOrDie("android:id/hey,there")).Build(), in TEST() 45 table.AddResource(NewResourceBuilder(test::ParseNameOrDie("android:id/hey:there")).Build(), in TEST() 50 ResourceTable table; in TEST() local 53 table.AddResource(NewResourceBuilder(test::ParseNameOrDie("android:id/heythere ")) in TEST() 60 ResourceTable table; in TEST() local 62 EXPECT_TRUE(table.AddResource( in TEST() 68 EXPECT_THAT(test::GetValue<Id>(&table, "android:attr/id"), NotNull()); in TEST() 72 ResourceTable table; in TEST() local 77 EXPECT_TRUE(table.AddResource( in TEST() [all …]
|
/frameworks/base/tools/aapt2/compile/ |
D | IdAssigner_test.cpp | 30 ::testing::AssertionResult VerifyIds(ResourceTable* table); 33 auto table = test::ResourceTableBuilder() in TEST_F() local 40 ASSERT_TRUE(assigner.Consume(context.get(), table.get())); in TEST_F() 41 ASSERT_TRUE(VerifyIds(table.get())); in TEST_F() 45 auto table = test::ResourceTableBuilder() in TEST_F() local 57 ASSERT_TRUE(assigner.Consume(context.get(), table.get())); in TEST_F() 58 ASSERT_TRUE(VerifyIds(table.get())); in TEST_F() 64 maybe_result = table->FindResource(test::ParseNameOrDie("android:dimen/two")); in TEST_F() 69 table->FindResource(test::ParseNameOrDie("android:integer/three")); in TEST_F() 77 table->FindResource(test::ParseNameOrDie("android:string/five")); in TEST_F() [all …]
|
D | PseudolocaleGenerator_test.cpp | 183 std::unique_ptr<ResourceTable> table = in TEST() local 194 String* val = test::GetValue<String>(table.get(), "android:string/four"); in TEST() 200 ASSERT_TRUE(generator.Consume(context.get(), table.get())); in TEST() 204 test::GetValueForConfig<String>(table.get(), "android:string/one", in TEST() 207 test::GetValueForConfig<String>(table.get(), "android:string/one", in TEST() 212 test::GetValueForConfig<String>(table.get(), "android:string/two", in TEST() 215 test::GetValueForConfig<String>(table.get(), "android:string/two", in TEST() 219 val = test::GetValueForConfig<String>(table.get(), "android:string/three", in TEST() 225 test::GetValueForConfig<String>(table.get(), "android:string/three", in TEST() 230 test::GetValueForConfig<String>(table.get(), "android:string/four", in TEST() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/app/procstats/ |
D | SparseMappingTableTest.java | 45 final SparseMappingTable.Table table = new SparseMappingTable.Table(data); in testParcelingEmpty() local 51 table.writeToParcel(tableParcel); in testParcelingEmpty() 73 final SparseMappingTable.Table table = new SparseMappingTable.Table(data); in testParceling() local 75 key = table.getOrAddKey(ID1, 1); in testParceling() 76 table.setValue(key, VALUE1); in testParceling() 78 key = table.getOrAddKey(ID2, 1); in testParceling() 79 table.setValue(key, VALUE2); in testParceling() 85 table.writeToParcel(tableParcel); in testParceling() 114 final SparseMappingTable.Table table = new SparseMappingTable.Table(data); in testParcelingWithReset() local 116 key = table.getOrAddKey(ID1, 1); in testParcelingWithReset() [all …]
|
/frameworks/base/tools/aapt2/split/ |
D | TableSplitter_test.cpp | 26 std::unique_ptr<ResourceTable> table = in TEST() local 46 splitter.SplitTable(table.get()); in TEST() 49 table.get(), "android:drawable/icon", in TEST() 52 table.get(), "android:drawable/icon", in TEST() 55 table.get(), "android:drawable/icon", in TEST() 58 table.get(), "android:drawable/icon", in TEST() 60 EXPECT_NE(nullptr, test::GetValue<Id>(table.get(), "android:string/one")); in TEST() 64 std::unique_ptr<ResourceTable> table = in TEST() local 85 splitter.SplitTable(table.get()); in TEST() 90 table.get(), "android:drawable/icon", in TEST() [all …]
|
/frameworks/base/tools/aapt2/java/ |
D | JavaClassGenerator_test.cpp | 35 std::unique_ptr<ResourceTable> table = in TEST() local 43 util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 46 JavaClassGenerator generator(context.get(), table.get(), {}); in TEST() 54 std::unique_ptr<ResourceTable> table = in TEST() local 67 .AddSymbolSource(util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 70 JavaClassGenerator generator(context.get(), table.get(), {}); in TEST() 83 std::unique_ptr<ResourceTable> table = in TEST() local 91 .AddSymbolSource(util::make_unique<ResourceTableSymbolSource>(table.get())) in TEST() 94 JavaClassGenerator generator(context.get(), table.get(), {}); in TEST() 108 std::unique_ptr<ResourceTable> table = in TEST() local [all …]
|
/frameworks/base/tests/utils/testutils/java/com/android/internal/util/test/ |
D | FakeSettingsProvider.java | 81 private Uri getUriFor(String table, String key) { in getUriFor() argument 82 switch (table) { in getUriFor() 90 throw new UnsupportedOperationException("Unknown settings table " + table); in getUriFor() 115 String table = commands[1]; in call() local 121 value = mTables.get(table).get(arg); in call() 125 table, arg, value)); in call() 134 table, arg, value)); in call() 137 mTables.get(table).put(arg, value); in call() 139 mTables.get(table).remove(arg); in call()
|
/frameworks/wilhelm/tests/examples/ |
D | xaVideoDecoderCapabilities.cpp | 64 const char *id_to_string(XAuint32 id, const id_to_string_t *table, size_t numEntries) in id_to_string() argument 68 if (id == table[i].id) { in id_to_string() 69 return table[i].string; in id_to_string() 83 const char *id_pair_to_string(XAuint32 id1, XAuint32 id2, const id_pair_to_string_t *table, in id_pair_to_string() argument 88 if (id1 == table[i].id1) { in id_pair_to_string() 89 return id_to_string(id2, table[i].id2_table, table[i].id2_numEntries); in id_pair_to_string() 148 static const id_pair_to_string_t table[] = { in videoProfileToString() local 155 return id_pair_to_string(codec, profile, table, sizeof(table) / sizeof(table[0])); in videoProfileToString() 212 static const id_pair_to_string_t table[] = { in videoLevelToString() local 219 return id_pair_to_string(codec, level, table, sizeof(table) / sizeof(table[0])); in videoLevelToString()
|
/frameworks/base/tools/preload/ |
D | sorttable.js | 34 forEach(document.getElementsByTagName('table'), function(table) { argument 35 if (table.className.search(/\bsortable\b/) != -1) { 36 sorttable.makeSortable(table); 42 makeSortable: function(table) { argument 43 if (table.getElementsByTagName('thead').length == 0) { 47 the.appendChild(table.rows[0]); 48 table.insertBefore(the,table.firstChild); 51 if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; 53 if (table.tHead.rows.length != 1) return; // can't cope with two header rows 60 for (var i=0; i<table.rows.length; i++) { [all …]
|
/frameworks/base/core/java/com/android/internal/content/ |
D | SelectionBuilder.java | 99 public Cursor query(SQLiteDatabase db, String table, String[] columns, String orderBy) { in query() argument 100 return query(db, table, columns, null, null, orderBy, null); in query() 106 public Cursor query(SQLiteDatabase db, String table, String[] columns, String groupBy, in query() argument 108 return db.query(table, columns, getSelection(), getSelectionArgs(), groupBy, having, in query() 115 public int update(SQLiteDatabase db, String table, ContentValues values) { in update() argument 116 return db.update(table, values, getSelection(), getSelectionArgs()); in update() 122 public int delete(SQLiteDatabase db, String table) { in delete() argument 123 return db.delete(table, getSelection(), getSelectionArgs()); in delete()
|
/frameworks/base/tools/aapt2/cmd/ |
D | Dump.cpp | 179 ResourceTable table; in Action() local 181 if (!DeserializeTableFromPb(pb_table, nullptr /*files*/, &table, &error)) { in Action() 189 Debug::PrintTable(table, print_options, printer_); in Action() 229 ResourceTable* table = apk->GetResourceTable(); in Dump() local 230 if (!table) { in Dump() 242 for (auto& package : table->packages) { in Dump() 270 ResourceTable* table = apk->GetResourceTable(); in Dump() local 271 if (!table) { in Dump() 278 StringPool::FlattenUtf8(&buffer, table->string_pool, GetDiagnostics()); in Dump() 292 const auto table = apk->GetResourceTable(); in Dump() local [all …]
|
/frameworks/av/media/codecs/amrnb/common/src/ |
D | lsp_lsf.cpp | 111 extern const Word16 table[]; 231 L_tmp = ((Word32)(table[ind + 1] - table[ind]) * offset) >> 8; in Lsf_lsp() 232 lsp[i] = add(table[ind], (Word16) L_tmp, pOverflow); in Lsf_lsp() 367 while (table[ind] < temp) in Lsp_lsf() 375 L_tmp = (Word32)(temp - table[ind]) * slope[ind]; in Lsp_lsf()
|
/frameworks/base/tools/aapt2/format/binary/ |
D | TableFlattener_test.cpp | 47 ResourceTable* table, std::string* out_content) { in Flatten() argument 50 if (!flattener.Consume(context, table)) { in Flatten() 58 ResourceTable* table, ResTable* out_table) { in Flatten() argument 60 auto result = Flatten(context, options, table, &content); in Flatten() 72 ResourceTable* table, ResourceTable* out_table) { in Flatten() argument 74 auto result = Flatten(context, options, table, &content); in Flatten() 87 ::testing::AssertionResult Exists(ResTable* table, const StringPiece& expected_name, in Exists() argument 94 table->setParameters(&expected_config); in Exists() 99 if (table->getResource(expected_id.id, &val, false, 0, &spec_flags, &config) < 0) { in Exists() 122 if (!table->getResourceName(expected_id.id, false, &actual_name)) { in Exists() [all …]
|
/frameworks/base/tests/JankBench/scripts/external/ |
D | statistics.py | 296 table = collections.Counter(iter(data)).most_common() 297 if not table: 298 return table 300 maxfreq = table[0][1] 301 for i in range(1, len(table)): 302 if table[i][1] != maxfreq: 303 table = table[:i] 305 return table 469 table = _counts(data) 470 if len(table) == 1: [all …]
|