add "/libs" unit testing, adjusted naming on previous unit tests

This commit is contained in:
Connor Tumbleson 2013-05-09 22:13:00 -05:00
parent 3a6d548756
commit acc83919d0
2 changed files with 17 additions and 3 deletions

View File

@ -167,6 +167,11 @@ public class BuildAndDecodeTest {
compareDrawablesFolder("drawable-xxhdpi");
}
@Test
public void libsTest() throws BrutException, IOException {
compareLibsFolder("libs");
}
private static boolean isAaptPresent() throws Exception {
boolean result = true;
try {
@ -182,8 +187,12 @@ public class BuildAndDecodeTest {
return result;
}
private void compareDrawable(String path) throws BrutException, IOException {
String tmp = File.separatorChar + "res" + File.separatorChar;
private void compareBinaryFolder(String path, boolean res) throws BrutException, IOException {
String tmp = "";
if (res) {
tmp = File.separatorChar + "res" + File.separatorChar;
}
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 {
sResult = true;
compareDrawable(path);
compareBinaryFolder(path, true);
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 {