Added multidex apk file in dalvik.test/data and a new test for multidex apk files.

This commit is contained in:
Sifis Lagouvardos 2018-09-21 14:32:03 +03:00 committed by Manu Sridharan
parent 819e7e1a7f
commit 6fd67b886e
2 changed files with 19 additions and 0 deletions

Binary file not shown.

View File

@ -77,4 +77,23 @@ public class MultiDexScopeTest {
Assert.assertEquals(Integer.valueOf(getNumberOfAppClasses(cha)), Integer.valueOf(getNumberOfAppClasses(cha2)));
}
@Test
public void testMultiDex() throws ClassHierarchyException, IOException {
AnalysisScope scope, scope2;
ClassHierarchy cha, cha2;
String multidexApk = "data/multidex-test.apk";
scope = setUpTestScope(multidexApk,"", MultiDexScopeTest.class.getClassLoader());
cha = ClassHierarchyFactory.make(scope);
scope2 = Util.makeDalvikScope(null,null, multidexApk);
cha2 = ClassHierarchyFactory.make(scope2);
Assert.assertEquals(Integer.valueOf(getNumberOfAppClasses(cha)),Integer.valueOf(5));
Assert.assertNotEquals(Integer.valueOf(getNumberOfAppClasses(cha)), Integer.valueOf(getNumberOfAppClasses(cha2)));
}
}