mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-20 16:57:34 +01:00
updated unit testing
-- styles.xml -- layouts.xml -- anims.xml -- drawables.xml -- attrs.xml -- raw/blank_test.png
This commit is contained in:
parent
aa20036307
commit
ed67a3d94d
@ -67,12 +67,22 @@ public class BuildAndDecodeTest {
|
||||
apkDecoder.decode();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesAnimsTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/anims.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesArraysTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/arrays.xml");
|
||||
compareValuesFiles("values-mcc002/arrays.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesAttrsTest() throws BrutException {
|
||||
compareValuesFiles("values/attrs.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesBoolsTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/bools.xml");
|
||||
@ -88,6 +98,11 @@ public class BuildAndDecodeTest {
|
||||
compareValuesFiles("values-mcc001/dimens.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesDrawablesTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/drawables.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesIdsTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/ids.xml");
|
||||
@ -98,6 +113,11 @@ public class BuildAndDecodeTest {
|
||||
compareValuesFiles("values-mcc001/integers.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesLayoutsTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/layouts.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void xmlPluralsTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/plurals.xml");
|
||||
@ -108,6 +128,11 @@ public class BuildAndDecodeTest {
|
||||
compareValuesFiles("values-mcc001/strings.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesStylesTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc001/styles.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void valuesReferencesTest() throws BrutException {
|
||||
compareValuesFiles("values-mcc002/strings.xml");
|
||||
@ -139,37 +164,42 @@ public class BuildAndDecodeTest {
|
||||
|
||||
@Test
|
||||
public void drawableNoDpiTest() throws BrutException, IOException {
|
||||
compareDrawablesFolder("drawable-nodpi");
|
||||
compareResFolder("drawable-nodpi");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void drawableNumberedDpiTest() throws BrutException, IOException {
|
||||
compareDrawablesFolder("drawable-534dpi");
|
||||
compareResFolder("drawable-534dpi");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void drawableLdpiTest() throws BrutException, IOException {
|
||||
compareDrawablesFolder("drawable-ldpi");
|
||||
compareResFolder("drawable-ldpi");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void drawableMdpiTest() throws BrutException, IOException {
|
||||
compareDrawablesFolder("drawable-mdpi");
|
||||
compareResFolder("drawable-mdpi");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void drawableTvdpiTest() throws BrutException, IOException {
|
||||
compareDrawablesFolder("drawable-tvdpi");
|
||||
compareResFolder("drawable-tvdpi");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void drawableXhdpiTest() throws BrutException, IOException {
|
||||
compareDrawablesFolder("drawable-xhdpi");
|
||||
compareResFolder("drawable-xhdpi");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void drawableXxhdpiTest() throws BrutException, IOException {
|
||||
compareDrawablesFolder("drawable-xxhdpi");
|
||||
compareResFolder("drawable-xxhdpi");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resRawTest() throws BrutException, IOException {
|
||||
compareResFolder("raw");
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -223,7 +253,7 @@ public class BuildAndDecodeTest {
|
||||
});
|
||||
}
|
||||
|
||||
private boolean compareDrawablesFolder(String path) throws BrutException, IOException {
|
||||
private boolean compareResFolder(String path) throws BrutException, IOException {
|
||||
sResult = true;
|
||||
compareBinaryFolder(path, true);
|
||||
return sResult;
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<item name="test_anims1" type="anim">@*android:anim/grow_fade_in_from_bottom</item>
|
||||
<item name="test_anims2" type="anim">@*android:anim/push_down_in</item>
|
||||
<item name="test_anims3" type="anim">@*android:anim/push_down_out</item>
|
||||
<item name="test_anims4" type="anim">@*android:anim/push_up_in</item>
|
||||
<item name="test_anims5" type="anim">@*android:anim/push_up_out</item>
|
||||
<item name="test_anims6" type="anim">@*android:anim/shrink_fade_out_from_bottom</item>
|
||||
<item name="test_anims7" type="anim">@*android:anim/slide_out_down</item>
|
||||
<item name="test_anims8" type="anim">@*android:anim/wallpaper_open_exit</item>
|
||||
<item name="test_anims9" type="anim">@*android:anim/wallpaper_open_exit</item>
|
||||
</resources>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<item name="test_drawable1" type="drawable">@*android:drawable/ab_bottom_solid_light_holo</item>
|
||||
<item name="test_drawable2" type="drawable">@*android:drawable/btn_check_off_holo_light</item>
|
||||
<item name="test_drawable3" type="drawable">@*android:drawable/btn_check_on_holo_light</item>
|
||||
<item name="test_drawable4" type="drawable">@*android:drawable/btn_keyboard_key_fulltrans</item>
|
||||
<item name="test_drawable5" type="drawable">#00000000</item>
|
||||
</resources>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<item name="test_layouts1" type="layout">@*android:layout/preference_header_item</item>
|
||||
<item name="test_layouts2" type="layout">@*android:layout/preference_list_fragment</item>
|
||||
<item name="test_layouts3" type="layout">@*android:layout/preference_widget_checkbox</item>
|
||||
<item name="test_layouts4" type="layout">@*android:layout/preference_widget_switch</item>
|
||||
</resources>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TextAppearance" parent="@*android:style/TextAppearance" />
|
||||
<style name="TextAppearance.EditEvent_Label" parent="@style/TextAppearance">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
</style>
|
||||
<style name="TextAppearance.EditEvent_Button" parent="@style/TextAppearance.EditEvent_Label">
|
||||
<item name="android:textColor">#ff777777</item>
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<attr format="integer" name="test_attr1"/>
|
||||
<attr format="reference" name="test_attr2"/>
|
||||
<attr format="reference" name="test_attr3"/>
|
||||
<attr format="string" name="test_attr4"/>
|
||||
<attr name="test_attr5">
|
||||
<enum name="out_test" value="0"/>
|
||||
<enum name="in_test" value="1"/>
|
||||
</attr>
|
||||
<attr format="reference" name="test_attr6"/>
|
||||
<attr format="reference" name="test_attr7"/>
|
||||
<attr format="reference|color" name="test_attr8"/>
|
||||
<attr format="color" name="test_attr9"/>
|
||||
<attr format="boolean" name="test_attr10"/>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user