use of com.android.aapt.Resources.Primitive in project bundletool by google.
the class XmlProtoPrintUtilsTest method getPrimitiveValueAsString_colorArgb8.
@Test
public void getPrimitiveValueAsString_colorArgb8() {
Primitive primitive = Primitive.newBuilder().setColorArgb4Value(0x12345678).build();
assertThat(XmlProtoPrintUtils.getPrimitiveValueAsString(primitive)).isEqualTo("#12345678");
}
use of com.android.aapt.Resources.Primitive in project bundletool by google.
the class XmlProtoPrintUtilsTest method getPrimitiveValueAsString_intHexadecimal.
@Test
public void getPrimitiveValueAsString_intHexadecimal() {
Primitive primitive = Primitive.newBuilder().setIntHexadecimalValue(0x12345678).build();
assertThat(XmlProtoPrintUtils.getPrimitiveValueAsString(primitive)).isEqualTo("0x12345678");
}
use of com.android.aapt.Resources.Primitive in project bundletool by google.
the class XmlProtoPrintUtilsTest method getPrimitiveValueAsString_empty.
@Test
public void getPrimitiveValueAsString_empty() {
Primitive primitive = Primitive.newBuilder().setEmptyValue(EmptyType.getDefaultInstance()).build();
assertThat(XmlProtoPrintUtils.getPrimitiveValueAsString(primitive)).isEmpty();
}
use of com.android.aapt.Resources.Primitive in project bundletool by google.
the class XmlProtoPrintUtilsTest method getPrimitiveValueAsString_null.
@Test
public void getPrimitiveValueAsString_null() {
Primitive primitive = Primitive.newBuilder().setNullValue(NullType.getDefaultInstance()).build();
assertThat(XmlProtoPrintUtils.getPrimitiveValueAsString(primitive)).isEmpty();
}
use of com.android.aapt.Resources.Primitive in project bundletool by google.
the class XmlProtoPrintUtilsTest method getPrimitiveValueAsString_colorRgb8.
@Test
public void getPrimitiveValueAsString_colorRgb8() {
Primitive primitive = Primitive.newBuilder().setColorRgb8Value(0xFF123456).build();
assertThat(XmlProtoPrintUtils.getPrimitiveValueAsString(primitive)).isEqualTo("#123456");
}