mirror of
https://github.com/revanced/Apktool.git
synced 2025-02-09 18:36:48 +01:00
add test for #1511
This commit is contained in:
parent
bd62f7e3e5
commit
b6751f893c
@ -371,6 +371,30 @@ public class BuildAndDecodeTest {
|
|||||||
assertEquals(controlImage.getRGB(30, 30), testImage.getRGB(30, 30));
|
assertEquals(controlImage.getRGB(30, 30), testImage.getRGB(30, 30));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void issue1511Test() throws BrutException, IOException {
|
||||||
|
char slash = File.separatorChar;
|
||||||
|
String location = slash + "res" + slash + "drawable-xxhdpi" + slash;
|
||||||
|
|
||||||
|
File control = new File((sTestOrigDir + location), "textfield_activated_holo_dark.9.png");
|
||||||
|
File test = new File((sTestNewDir + location), "textfield_activated_holo_dark.9.png");
|
||||||
|
|
||||||
|
BufferedImage controlImage = ImageIO.read(control);
|
||||||
|
BufferedImage testImage = ImageIO.read(test);
|
||||||
|
|
||||||
|
// Check entire image as we cannot mess this up
|
||||||
|
final int w = controlImage.getWidth(),
|
||||||
|
h = controlImage.getHeight();
|
||||||
|
|
||||||
|
final int[] controlImageGrid = controlImage.getRGB(0, 0, w, h, null, 0, w);
|
||||||
|
final int[] testImageGrid = testImage.getRGB(0, 0, w, h, null, 0, w);
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < controlImageGrid.length; i++) {
|
||||||
|
assertEquals("Image lost Optical Bounds at i = " + i, controlImageGrid[i], testImageGrid[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void drawableXxhdpiTest() throws BrutException, IOException {
|
public void drawableXxhdpiTest() throws BrutException, IOException {
|
||||||
compareResFolder("drawable-xxhdpi");
|
compareResFolder("drawable-xxhdpi");
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 327 B |
Loading…
x
Reference in New Issue
Block a user