test: add triple dex test on aapt2

This commit is contained in:
Connor Tumbleson 2020-11-27 10:14:39 -05:00 committed by Connor Tumbleson
parent 9170c5a04b
commit 5658c959b4
4 changed files with 65 additions and 0 deletions

View File

@ -124,4 +124,24 @@ public class BuildAndDecodeTest extends BaseTest {
public void xmlXsdFileTest() throws BrutException { public void xmlXsdFileTest() throws BrutException {
compareXmlFiles("res/xml/ww_box_styles_schema.xsd"); compareXmlFiles("res/xml/ww_box_styles_schema.xsd");
} }
@Test
public void multipleDexTest() throws BrutException, IOException {
compareBinaryFolder("/smali_classes2", false);
compareBinaryFolder("/smali_classes3", false);
File classes2Dex = new File(sTestOrigDir, "build/apk/classes2.dex");
File classes3Dex = new File(sTestOrigDir, "build/apk/classes3.dex");
assertTrue(classes2Dex.isFile());
assertTrue(classes3Dex.isFile());
}
@Test
public void singleDexTest() throws BrutException, IOException {
compareBinaryFolder("/smali", false);
File classesDex = new File(sTestOrigDir, "build/apk/classes.dex");
assertTrue(classesDex.isFile());
}
} }

View File

@ -0,0 +1,15 @@
.class public LHelloWorld;
.super Ljava/lang/Object;
.method public static main([Ljava/lang/String;)V
.registers 2
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const/high16 v1, 0x7f020000
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method

View File

@ -0,0 +1,15 @@
.class public LHelloDualDexSupport;
.super Ljava/lang/Object;
.method public static main([Ljava/lang/String;)V
.registers 2
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const/high16 v1, 0x7f020000
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method

View File

@ -0,0 +1,15 @@
.class public LHelloTripleDexSupport;
.super Ljava/lang/Object;
.method public static main([Ljava/lang/String;)V
.registers 2
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const/high16 v1, 0x7f020000
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
return-void
.end method