/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | FontScaleConverterTest.kt | 31 val table = createTable(8f to 8f, 10f to 10f, 20f to 20f) in straightInterpolation() constant 32 verifyConversionBothWays(table, 1f, 1F) in straightInterpolation() 33 verifyConversionBothWays(table, 8f, 8F) in straightInterpolation() 34 verifyConversionBothWays(table, 10f, 10F) in straightInterpolation() 35 verifyConversionBothWays(table, 30f, 30F) in straightInterpolation() 36 verifyConversionBothWays(table, 20f, 20F) in straightInterpolation() 37 verifyConversionBothWays(table, 5f, 5F) in straightInterpolation() 38 verifyConversionBothWays(table, 0f, 0F) in straightInterpolation() 43 val table = createTable(8f to 16f, 10f to 20f, 30f to 60f) in interpolate200Percent() constant 44 verifyConversionBothWays(table, 2f, 1F) in interpolate200Percent() [all …]
|
D | FontScaleConverterFactoryTest.kt | 68 val table = FontScaleConverterFactory.forScale(2F)!! in <lambda>() constant 69 assertThat(table.convertSpToDp(1F)).isWithin(CONVERSION_TOLERANCE).of(2f) in <lambda>() 70 assertThat(table.convertSpToDp(8F)).isWithin(CONVERSION_TOLERANCE).of(16f) in <lambda>() 71 assertThat(table.convertSpToDp(10F)).isWithin(CONVERSION_TOLERANCE).of(20f) in <lambda>() 72 assertThat(table.convertSpToDp(5F)).isWithin(CONVERSION_TOLERANCE).of(10f) in <lambda>() 73 assertThat(table.convertSpToDp(0F)).isWithin(CONVERSION_TOLERANCE).of(0f) in <lambda>() 79 val table = FontScaleConverterFactory.forScale(3F)!! in <lambda>() constant 82 assertThat(table.convertSpToDp(it)).isWithin(CONVERSION_TOLERANCE).of(it * 3f) in <lambda>() 84 assertThat(table.convertSpToDp(1F)).isWithin(CONVERSION_TOLERANCE).of(3f) in <lambda>() 85 assertThat(table.convertSpToDp(8F)).isWithin(CONVERSION_TOLERANCE).of(24f) in <lambda>() [all …]
|
/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 | 41 ResTable table; in TEST() local 42 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 50 ResTable table; in TEST() local 51 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 53 EXPECT_TRUE(IsStringEqual(table, basic::R::string::test1, "test1")); in TEST() 61 ResTable table; in TEST() local 62 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); in TEST() 67 table.identifierForName(testName.c_str(), testName.size(), 0, 0, in TEST() 78 ResTable table; in TEST() local 79 ASSERT_EQ(NO_ERROR, table.add(contents.data(), contents.size())); 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/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 | 184 std::unique_ptr<ResourceTable> table = in TEST() local 195 String* val = test::GetValue<String>(table.get(), "android:string/four"); in TEST() 201 ASSERT_TRUE(generator.Consume(context.get(), table.get())); in TEST() 205 test::GetValueForConfig<String>(table.get(), "android:string/one", in TEST() 208 test::GetValueForConfig<String>(table.get(), "android:string/one", in TEST() 213 test::GetValueForConfig<String>(table.get(), "android:string/two", in TEST() 216 test::GetValueForConfig<String>(table.get(), "android:string/two", in TEST() 220 val = test::GetValueForConfig<String>(table.get(), "android:string/three", in TEST() 226 test::GetValueForConfig<String>(table.get(), "android:string/three", in TEST() 231 test::GetValueForConfig<String>(table.get(), "android:string/four", in TEST() [all …]
|
/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 | 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 | 39 ResourceTable table; in TEST() local 42 table.AddResource(NewResourceBuilder(test::ParseNameOrDie("android:id/hey,there")).Build(), in TEST() 46 table.AddResource(NewResourceBuilder(test::ParseNameOrDie("android:id/hey:there")).Build(), in TEST() 51 ResourceTable table; in TEST() local 54 table.AddResource(NewResourceBuilder(test::ParseNameOrDie("android:id/heythere ")) in TEST() 61 ResourceTable table; in TEST() local 63 EXPECT_TRUE(table.AddResource( in TEST() 69 EXPECT_THAT(test::GetValue<Id>(&table, "android:attr/id"), NotNull()); in TEST() 73 ResourceTable table; in TEST() local 78 EXPECT_TRUE(table.AddResource( in TEST() [all …]
|
/frameworks/base/tools/aapt2/process/ |
D | ProductFilter_test.cpp | 31 ResourceTable table; in TEST() local 32 ASSERT_TRUE(table.AddResource( in TEST() 39 ASSERT_TRUE(table.AddResource( in TEST() 46 ASSERT_TRUE(table.AddResource( in TEST() 53 ASSERT_TRUE(table.AddResource( in TEST() 61 ASSERT_TRUE(filter.Consume(context.get(), &table)); in TEST() 63 EXPECT_EQ(nullptr, test::GetValueForConfigAndProduct<Id>(&table, "android:string/one", land, "")); in TEST() 65 test::GetValueForConfigAndProduct<Id>(&table, "android:string/one", land, "tablet")); in TEST() 66 EXPECT_EQ(nullptr, test::GetValueForConfigAndProduct<Id>(&table, "android:string/one", port, "")); in TEST() 68 test::GetValueForConfigAndProduct<Id>(&table, "android:string/one", port, "tablet")); 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/libs/binary_translation/tools/nogrod/ |
D | string_offset_table_tests.cc | 37 StringOffsetTable table(Buffer{bit_cast<const uint8_t*>(data.data()), data.size() * sizeof(T)}); in RunSmokeTest() local 39 EXPECT_EQ(table.GetStringOffset(sizeof(T) * 2, 1), 3U); in RunSmokeTest() 40 EXPECT_EQ(table.GetStringOffset(sizeof(T) * 2, 5), 7U); in RunSmokeTest() 41 EXPECT_EQ(table.GetStringOffset(sizeof(T) * (data.size() - 1), 0), 9U); in RunSmokeTest() 43 EXPECT_DEATH((void)table.GetStringOffset(sizeof(T) * 0, 2), ""); in RunSmokeTest() 44 EXPECT_DEATH((void)table.GetStringOffset(sizeof(T) * (data.size()), 0), ""); in RunSmokeTest() 45 EXPECT_DEATH((void)table.GetStringOffset(sizeof(T) * 2, data.size() - 2), ""); in RunSmokeTest() 48 EXPECT_DEATH((void)table.GetStringOffset(sizeof(T) * 2 + 1, 0), ""); in RunSmokeTest() 49 EXPECT_DEATH((void)table.GetStringOffset(sizeof(T) * 2 + sizeof(T) / 2, 0), ""); in RunSmokeTest()
|
/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/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/format/binary/ |
D | ResEntryWriter_test.cpp | 38 std::vector<int32_t> WriteAllEntries(const ResourceTableView& table, ResEntryWriter& writer) { in WriteAllEntries() argument 40 for (const auto& type : table.packages[0].types) { in WriteAllEntries() 52 std::unique_ptr<ResourceTable> table = in TEST_F() local 62 auto offsets = WriteAllEntries(table->GetPartitionedView(), writer); in TEST_F() 74 auto offsets = WriteAllEntries(table->GetPartitionedView(), writer); in TEST_F() 95 std::unique_ptr<ResourceTable> table = test::ResourceTableBuilder() in TEST_F() local 103 auto offsets = WriteAllEntries(table->GetPartitionedView(), writer); in TEST_F() 114 auto offsets = WriteAllEntries(table->GetPartitionedView(), writer); in TEST_F() 123 std::unique_ptr<ResourceTable> table = in TEST_F() local 133 auto offsets = WriteAllEntries(table->GetPartitionedView(), writer); in TEST_F() [all …]
|
/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 …]
|