mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-04 18:12:54 +01:00
cleanup tests
This commit is contained in:
parent
f19317d87c
commit
e794508869
@ -21,7 +21,6 @@ import brut.common.BrutException;
|
||||
import brut.util.OS;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.junit.*;
|
||||
import static org.junit.Assert.*;
|
||||
@ -29,10 +28,10 @@ import static org.junit.Assert.*;
|
||||
public class AndResGuardTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/issue1170/", sTmpDir);
|
||||
TestUtils.copyResourceDir(AndResGuardTest.class, "brut/apktool/issue1170/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
@ -62,6 +61,4 @@ public class AndResGuardTest {
|
||||
|
||||
private static ExtFile sTmpDir;
|
||||
private static ExtFile sTestOrigDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeTest.class.getName());
|
||||
}
|
||||
}
|
@ -33,7 +33,7 @@ import static org.junit.Assert.assertTrue;
|
||||
public class BuildAndDecodeJarTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "testjar-orig");
|
||||
@ -66,4 +66,4 @@ public class BuildAndDecodeJarTest {
|
||||
private static ExtFile sTestNewDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeJarTest.class.getName());
|
||||
}
|
||||
}
|
@ -44,7 +44,7 @@ import javax.imageio.ImageIO;
|
||||
public class BuildAndDecodeTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
|
@ -37,7 +37,7 @@ import static org.junit.Assert.assertTrue;
|
||||
public class DebugTagRetainedTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "issue1235-orig");
|
||||
|
@ -18,12 +18,12 @@ import static org.junit.Assert.assertEquals;
|
||||
public class DefaultBaksmaliVariableTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "testjar-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "testjar-new");
|
||||
LOGGER.info("Unpacking testjar...");
|
||||
TestUtils.copyResourceDir(BuildAndDecodeJarTest.class, "brut/apktool/issue1481/", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(DefaultBaksmaliVariableTest.class, "brut/apktool/issue1481/", sTestOrigDir);
|
||||
|
||||
LOGGER.info("Building issue1481.jar...");
|
||||
File testJar = new File(sTmpDir, "issue1481.jar");
|
||||
@ -99,5 +99,5 @@ public class DefaultBaksmaliVariableTest {
|
||||
private static ExtFile sTestOrigDir;
|
||||
private static ExtFile sTestNewDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeJarTest.class.getName());
|
||||
private final static Logger LOGGER = Logger.getLogger(DefaultBaksmaliVariableTest.class.getName());
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@ -37,10 +36,10 @@ import static org.junit.Assert.assertTrue;
|
||||
public class DoubleExtensionUnknownFileTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/issue1244/", sTmpDir);
|
||||
TestUtils.copyResourceDir(DoubleExtensionUnknownFileTest.class, "brut/apktool/issue1244/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
@ -67,6 +66,4 @@ public class DoubleExtensionUnknownFileTest {
|
||||
}
|
||||
|
||||
private static ExtFile sTmpDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeJarTest.class.getName());
|
||||
}
|
@ -22,7 +22,6 @@ import brut.util.OS;
|
||||
import java.io.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.custommonkey.xmlunit.*;
|
||||
import org.junit.*;
|
||||
@ -32,7 +31,7 @@ import org.xml.sax.SAXException;
|
||||
public class LargeIntsInManifestTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/issue767/", sTmpDir);
|
||||
@ -94,6 +93,4 @@ public class LargeIntsInManifestTest {
|
||||
private static ExtFile sTmpDir;
|
||||
private static ExtFile sTestOrigDir;
|
||||
private static ExtFile sTestNewDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeTest.class.getName());
|
||||
}
|
||||
|
@ -35,10 +35,10 @@ import static org.junit.Assert.assertEquals;
|
||||
public class MissingVersionManifestTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/issue1264/", sTmpDir);
|
||||
TestUtils.copyResourceDir(MissingVersionManifestTest.class, "brut/apktool/issue1264/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
@ -61,6 +61,4 @@ public class MissingVersionManifestTest {
|
||||
}
|
||||
|
||||
private static ExtFile sTmpDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeJarTest.class.getName());
|
||||
}
|
@ -17,7 +17,6 @@ package brut.androlib;
|
||||
|
||||
import brut.androlib.res.xml.ResXmlEncoders;
|
||||
import org.junit.Test;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@ -54,6 +53,4 @@ public class PositionalEnumerationTest {
|
||||
private String enumerateArguments(String value) {
|
||||
return ResXmlEncoders.enumerateNonPositionalSubstitutionsIfRequired(value);
|
||||
}
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeJarTest.class.getName());
|
||||
}
|
@ -84,4 +84,4 @@ public class ProviderAttributeTest {
|
||||
}
|
||||
|
||||
private static ExtFile sTmpDir;
|
||||
}
|
||||
}
|
@ -25,7 +25,6 @@ import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@ -35,10 +34,10 @@ import static org.junit.Assert.assertEquals;
|
||||
public class ReferenceVersionCodeTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/issue1234/", sTmpDir);
|
||||
TestUtils.copyResourceDir(ReferenceVersionCodeTest.class, "brut/apktool/issue1234/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
@ -61,6 +60,4 @@ public class ReferenceVersionCodeTest {
|
||||
}
|
||||
|
||||
private static ExtFile sTmpDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeJarTest.class.getName());
|
||||
}
|
@ -25,7 +25,6 @@ import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
@ -36,10 +35,10 @@ import static org.junit.Assert.assertNotSame;
|
||||
public class UnknownCompressionTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception, BrutException {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/unknown_compression/", sTmpDir);
|
||||
TestUtils.copyResourceDir(UnknownCompressionTest.class, "brut/apktool/unknown_compression/", sTmpDir);
|
||||
|
||||
String apk = "deflated_unknowns.apk";
|
||||
ApkOptions apkOptions = new ApkOptions();
|
||||
@ -90,6 +89,4 @@ public class UnknownCompressionTest {
|
||||
|
||||
private static ExtFile sOriginalFile;
|
||||
private static ExtFile sBuiltFile;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(BuildAndDecodeJarTest.class.getName());
|
||||
}
|
@ -25,7 +25,6 @@ import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@ -66,6 +65,4 @@ public class VectorDrawableTest {
|
||||
|
||||
private static ExtFile sTmpDir;
|
||||
private static ExtFile sTestOrigDir;
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(VectorDrawableTest.class.getName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user