Lines Matching refs:ResourceUtils

33   EXPECT_THAT(ResourceUtils::ParseBool("true"), Eq(Maybe<bool>(true)));  in TEST()
34 EXPECT_THAT(ResourceUtils::ParseBool("TRUE"), Eq(Maybe<bool>(true))); in TEST()
35 EXPECT_THAT(ResourceUtils::ParseBool("True"), Eq(Maybe<bool>(true))); in TEST()
37 EXPECT_THAT(ResourceUtils::ParseBool("false"), Eq(Maybe<bool>(false))); in TEST()
38 EXPECT_THAT(ResourceUtils::ParseBool("FALSE"), Eq(Maybe<bool>(false))); in TEST()
39 EXPECT_THAT(ResourceUtils::ParseBool("False"), Eq(Maybe<bool>(false))); in TEST()
41 EXPECT_THAT(ResourceUtils::ParseBool(" False\n "), Eq(Maybe<bool>(false))); in TEST()
47 EXPECT_TRUE(ResourceUtils::ParseResourceName("android:color/foo", &actual, &actual_priv)); in TEST()
51 EXPECT_TRUE(ResourceUtils::ParseResourceName("color/foo", &actual, &actual_priv)); in TEST()
55 EXPECT_TRUE(ResourceUtils::ParseResourceName("*android:color/foo", &actual, &actual_priv)); in TEST()
59 EXPECT_FALSE(ResourceUtils::ParseResourceName(android::StringPiece(), &actual, &actual_priv)); in TEST()
66 EXPECT_TRUE(ResourceUtils::ParseReference("@color/foo", &actual, &create, &private_ref)); in TEST()
76 EXPECT_TRUE(ResourceUtils::ParseReference("@android:color/foo", &actual, &create, &private_ref)); in TEST()
86 …EXPECT_TRUE(ResourceUtils::ParseReference("\t @android:color/foo\n \n\t", &actual, &create, &priva… in TEST()
96 EXPECT_TRUE(ResourceUtils::ParseReference("@+android:id/foo", &actual, &create, &private_ref)); in TEST()
106 EXPECT_TRUE(ResourceUtils::ParseReference("@*android:id/foo", &actual, &create, &private_ref)); in TEST()
116 …EXPECT_FALSE(ResourceUtils::ParseReference("@+android:color/foo", &actual, &create, &private_ref)); in TEST()
120 EXPECT_TRUE(ResourceUtils::IsAttributeReference("?android")); in TEST()
121 EXPECT_TRUE(ResourceUtils::IsAttributeReference("?android:foo")); in TEST()
122 EXPECT_TRUE(ResourceUtils::IsAttributeReference("?attr/foo")); in TEST()
123 EXPECT_TRUE(ResourceUtils::IsAttributeReference("?android:attr/foo")); in TEST()
127 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?style/foo")); in TEST()
128 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?android:style/foo")); in TEST()
129 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?android:")); in TEST()
130 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?android:attr/")); in TEST()
131 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?:attr/")); in TEST()
132 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?:attr/foo")); in TEST()
133 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?:/")); in TEST()
134 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?:/foo")); in TEST()
135 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?attr/")); in TEST()
136 EXPECT_FALSE(ResourceUtils::IsAttributeReference("?/foo")); in TEST()
144 Maybe<Reference> ref = ResourceUtils::ParseStyleParentReference("@android:style/foo", &err_str); in TEST()
148 ref = ResourceUtils::ParseStyleParentReference("@style/foo", &err_str); in TEST()
152 ref = ResourceUtils::ParseStyleParentReference("?android:style/foo", &err_str); in TEST()
156 ref = ResourceUtils::ParseStyleParentReference("?style/foo", &err_str); in TEST()
160 ref = ResourceUtils::ParseStyleParentReference("android:style/foo", &err_str); in TEST()
164 ref = ResourceUtils::ParseStyleParentReference("android:foo", &err_str); in TEST()
168 ref = ResourceUtils::ParseStyleParentReference("@android:foo", &err_str); in TEST()
172 ref = ResourceUtils::ParseStyleParentReference("foo", &err_str); in TEST()
176 ref = ResourceUtils::ParseStyleParentReference("*android:style/foo", &err_str); in TEST()
189 std::unique_ptr<BinaryPrimitive> result = ResourceUtils::TryParseFlagSymbol(attr.get(), ""); in TEST()
195 ASSERT_THAT(ResourceUtils::MakeNull(), Pointee(ValueEq(Reference()))); in TEST()
196 ASSERT_THAT(ResourceUtils::TryParseNullOrEmpty("@null"), Pointee(ValueEq(Reference()))); in TEST()
200 …ASSERT_THAT(ResourceUtils::MakeEmpty(), Pointee(ValueEq(BinaryPrimitive(Res_value::TYPE_NULL, Res_… in TEST()
201 …ASSERT_THAT(ResourceUtils::TryParseNullOrEmpty("@empty"), Pointee(ValueEq(BinaryPrimitive(Res_valu… in TEST()
205 EXPECT_THAT(ResourceUtils::TryParseItemForAttribute(" 12\n ", ResTable_map::TYPE_INTEGER), in TEST()
207 EXPECT_THAT(ResourceUtils::TryParseItemForAttribute(" true\n ", ResTable_map::TYPE_BOOLEAN), in TEST()
212 EXPECT_THAT(ResourceUtils::TryParseItemForAttribute(" 12.0\n ", ResTable_map::TYPE_FLOAT), in TEST()
217 EXPECT_THAT(ResourceUtils::ParseSdkVersion("Q"), Eq(Maybe<int>(10000))); in TEST()
219 ResourceUtils::ParseSdkVersion("Q.fingerprint"), in TEST()
222 EXPECT_THAT(ResourceUtils::ParseSdkVersion("R"), Eq(Maybe<int>(10000))); in TEST()
224 ResourceUtils::ParseSdkVersion("R.fingerprint"), in TEST()
229 EXPECT_THAT(ResourceUtils::StringBuilder() in TEST()
234 EXPECT_THAT(ResourceUtils::StringBuilder() in TEST()
239 EXPECT_THAT(ResourceUtils::StringBuilder() in TEST()
247 EXPECT_THAT(ResourceUtils::StringBuilder() in TEST()
252 EXPECT_THAT(ResourceUtils::StringBuilder().AppendText("\\@\\?\\#\\\\\\'").to_string(), in TEST()
257 ResourceUtils::StringBuilder builder; in TEST()
262 EXPECT_THAT(ResourceUtils::StringBuilder().AppendText("\\u00AF\\u0AF0 woah").to_string(), in TEST()
264 EXPECT_FALSE(ResourceUtils::StringBuilder().AppendText("\\u00 yo")); in TEST()
268 EXPECT_THAT(ResourceUtils::StringBuilder(true /*preserve_spaces*/).AppendText("\"").to_string(), in TEST()