Add unit-test for #1508

This commit is contained in:
Connor Tumbleson 2017-05-25 07:02:10 -04:00
parent d2e16044bd
commit c3ea300b96
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75
2 changed files with 21 additions and 0 deletions

View File

@ -350,6 +350,27 @@ public class BuildAndDecodeTest {
assertEquals(controlImage.getRGB(30, 30), testImage.getRGB(30, 30));
}
@Test
public void issue1508Test() throws BrutException, IOException {
char slash = File.separatorChar;
String location = slash + "res" + slash + "drawable-xhdpi" + slash;
File control = new File((sTestOrigDir + location), "btn_zoom_up_normal.9.png");
File test = new File((sTestNewDir + location), "btn_zoom_up_normal.9.png");
BufferedImage controlImage = ImageIO.read(control);
BufferedImage testImage = ImageIO.read(test);
// 0, 0 = clear
assertEquals(controlImage.getRGB(0, 0), testImage.getRGB(0, 0));
// 30, 0 = black line
assertEquals(controlImage.getRGB(0, 30), testImage.getRGB(0, 30));
// 30, 30 = greyish button
assertEquals(controlImage.getRGB(30, 30), testImage.getRGB(30, 30));
}
@Test
public void drawableXxhdpiTest() throws BrutException, IOException {
compareResFolder("drawable-xxhdpi");

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB