Lines Matching refs:table
35 ResourceTable table;
37 EXPECT_FALSE(table.AddResource(
42 EXPECT_FALSE(table.AddResource(
49 ResourceTable table;
51 EXPECT_TRUE(table.AddResourceMangled(
57 ResourceTable table;
59 EXPECT_TRUE(table.AddResource(
64 EXPECT_THAT(test::GetValue<Id>(&table, "android:attr/id"), NotNull());
68 ResourceTable table;
74 EXPECT_TRUE(table.AddResource(
79 EXPECT_TRUE(table.AddResource(
84 EXPECT_TRUE(table.AddResource(
89 EXPECT_TRUE(table.AddResource(
96 EXPECT_THAT(test::GetValue<Id>(&table, "android:attr/layout_width"), NotNull());
97 EXPECT_THAT(test::GetValue<Id>(&table, "android:attr/id"), NotNull());
98 EXPECT_THAT(test::GetValue<Id>(&table, "android:string/ok"), NotNull());
99 EXPECT_THAT(test::GetValueForConfig<BinaryPrimitive>(&table, "android:string/ok", language_config), NotNull());
103 ResourceTable table;
105 ASSERT_TRUE(table.AddResource(test::ParseNameOrDie("android:attr/foo"), ConfigDescription{}, "",
109 Attribute* attr = test::GetValue<Attribute>(&table, "android:attr/foo");
113 ASSERT_TRUE(table.AddResource(test::ParseNameOrDie("android:attr/foo"), ConfigDescription{}, "",
116 attr = test::GetValue<Attribute>(&table, "android:attr/foo");
122 ResourceTable table;
130 ASSERT_TRUE(table.AddResource(name, ConfigDescription{}, "",
132 ASSERT_TRUE(table.AddResource(name, ConfigDescription{}, "",
137 ResourceTable table;
139 EXPECT_TRUE(table.AddResource(test::ParseNameOrDie("android:string/foo"),
143 EXPECT_TRUE(table.AddResource(test::ParseNameOrDie("android:string/foo"),
148 EXPECT_THAT(test::GetValueForConfigAndProduct<Id>(&table, "android:string/foo",test::ParseConfigOrDie("land"), "tablet"), NotNull());
149 EXPECT_THAT(test::GetValueForConfigAndProduct<Id>(&table, "android:string/foo",test::ParseConfigOrDie("land"), "phone"), NotNull());
152 table.FindResource(test::ParseNameOrDie("android:string/foo"));
172 static ::testing::AssertionResult VisibilityOfResource(const ResourceTable& table,
176 Maybe<ResourceTable::SearchResult> result = table.FindResource(name);
178 return ::testing::AssertionFailure() << "no resource '" << name << "' found in table";
197 ResourceTable table;
203 ASSERT_TRUE(table.SetVisibility(name, visibility, test::GetDiagnostics()));
204 ASSERT_TRUE(VisibilityOfResource(table, name, Level::kPrivate, "private"));
208 ASSERT_TRUE(table.SetVisibility(name, visibility, test::GetDiagnostics()));
209 ASSERT_TRUE(VisibilityOfResource(table, name, Level::kPrivate, "private"));
213 ASSERT_TRUE(table.SetVisibility(name, visibility, test::GetDiagnostics()));
214 ASSERT_TRUE(VisibilityOfResource(table, name, Level::kPublic, "public"));
218 ASSERT_TRUE(table.SetVisibility(name, visibility, test::GetDiagnostics()));
219 ASSERT_TRUE(VisibilityOfResource(table, name, Level::kPublic, "public"));
223 ResourceTable table;
230 ASSERT_TRUE(table.SetAllowNew(name, allow_new, test::GetDiagnostics()));
231 result = table.FindResource(name);
237 ASSERT_TRUE(table.SetAllowNew(name, allow_new, test::GetDiagnostics()));
238 result = table.FindResource(name);
245 ResourceTable table;
251 ASSERT_TRUE(table.SetOverlayable(name, overlayable, test::GetDiagnostics()));
252 Maybe<ResourceTable::SearchResult> result = table.FindResource(name);
258 ASSERT_FALSE(table.SetOverlayable(name, overlayable, test::GetDiagnostics()));