mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-22 01:37:34 +01:00
add "/libs" unit testing, adjusted naming on previous unit tests
This commit is contained in:
parent
3a6d548756
commit
acc83919d0
@ -167,6 +167,11 @@ public class BuildAndDecodeTest {
|
|||||||
compareDrawablesFolder("drawable-xxhdpi");
|
compareDrawablesFolder("drawable-xxhdpi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void libsTest() throws BrutException, IOException {
|
||||||
|
compareLibsFolder("libs");
|
||||||
|
}
|
||||||
|
|
||||||
private static boolean isAaptPresent() throws Exception {
|
private static boolean isAaptPresent() throws Exception {
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
try {
|
try {
|
||||||
@ -182,8 +187,12 @@ public class BuildAndDecodeTest {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void compareDrawable(String path) throws BrutException, IOException {
|
private void compareBinaryFolder(String path, boolean res) throws BrutException, IOException {
|
||||||
String tmp = File.separatorChar + "res" + File.separatorChar;
|
|
||||||
|
String tmp = "";
|
||||||
|
if (res) {
|
||||||
|
tmp = File.separatorChar + "res" + File.separatorChar;
|
||||||
|
}
|
||||||
|
|
||||||
Files.walkFileTree(Paths.get(sTestOrigDir.toPath() + tmp + path), new SimpleFileVisitor<Path>() {
|
Files.walkFileTree(Paths.get(sTestOrigDir.toPath() + tmp + path), new SimpleFileVisitor<Path>() {
|
||||||
|
|
||||||
@ -211,9 +220,14 @@ public class BuildAndDecodeTest {
|
|||||||
|
|
||||||
private boolean compareDrawablesFolder(String path) throws BrutException, IOException {
|
private boolean compareDrawablesFolder(String path) throws BrutException, IOException {
|
||||||
sResult = true;
|
sResult = true;
|
||||||
compareDrawable(path);
|
compareBinaryFolder(path, true);
|
||||||
return sResult;
|
return sResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean compareLibsFolder(String path) throws BrutException, IOException {
|
||||||
|
sResult = true;
|
||||||
|
compareBinaryFolder(File.separatorChar + path,false);
|
||||||
|
return sResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void compareValuesFiles(String path) throws BrutException {
|
private void compareValuesFiles(String path) throws BrutException {
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user