Search in sources :

Example 6 with Primitive

use of com.android.aapt.Resources.Primitive in project bundletool by google.

the class XmlProtoPrintUtilsTest method getPrimitiveValueAsString_colorArgb4.

@Test
public void getPrimitiveValueAsString_colorArgb4() {
    Primitive primitive = Primitive.newBuilder().setColorArgb4Value(0x11223344).build();
    assertThat(XmlProtoPrintUtils.getPrimitiveValueAsString(primitive)).isEqualTo("#11223344");
}
Also used : Primitive(com.android.aapt.Resources.Primitive) Test(org.junit.Test)

Example 7 with Primitive

use of com.android.aapt.Resources.Primitive in project bundletool by google.

the class XmlProtoPrintUtilsTest method getPrimitiveValueAsString_colorRgb4.

@Test
public void getPrimitiveValueAsString_colorRgb4() {
    Primitive primitive = Primitive.newBuilder().setColorRgb4Value(0xFF112233).build();
    assertThat(XmlProtoPrintUtils.getPrimitiveValueAsString(primitive)).isEqualTo("#112233");
}
Also used : Primitive(com.android.aapt.Resources.Primitive) Test(org.junit.Test)

Aggregations

Primitive (com.android.aapt.Resources.Primitive)7 Test (org.junit.Test)7