use of com.android.aapt.Resources.CompoundValue in project bundletool by google.
the class XmlProtoPrintUtilsTest method getCompoundValueAsString_attr.
@Test
public void getCompoundValueAsString_attr() {
CompoundValue compoundValue = CompoundValue.newBuilder().setAttr(Attribute.newBuilder().addSymbol(Symbol.newBuilder().setName(createReference("name1")).setValue(123)).addSymbol(Symbol.newBuilder().setName(createReference("name2")).setValue(456))).build();
assertThat(XmlProtoPrintUtils.getCompoundValueAsString(compoundValue)).isEqualTo("{name1=123, name2=456}");
}
use of com.android.aapt.Resources.CompoundValue in project bundletool by google.
the class XmlProtoPrintUtilsTest method getCompoundValueAsString_plural.
@Test
public void getCompoundValueAsString_plural() {
CompoundValue compoundValue = CompoundValue.newBuilder().setPlural(Plural.newBuilder().addEntry(Plural.Entry.newBuilder().setArity(Arity.ONE).setItem(createItem("one"))).addEntry(Plural.Entry.newBuilder().setArity(Arity.MANY).setItem(createItem("many")))).build();
assertThat(XmlProtoPrintUtils.getCompoundValueAsString(compoundValue)).isEqualTo("{ONE=\"one\", MANY=\"many\"}");
}
Aggregations