Added explicit test for null permissions.
This wouldn'tve actually found the problem in the previous commit, due to the null happening before checking permissions while logging perms. However, still seems like a nice test to have so that the method itself handles nulls correctly.
This commit is contained in:
parent
6d89fca664
commit
0a2cd98bdd
@ -99,6 +99,15 @@ public class ApkVerifierTest {
|
|||||||
assertTrue(extendedPermsXml.exists());
|
assertTrue(extendedPermsXml.exists());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNulls() {
|
||||||
|
assertTrue(ApkVerifier.requestedPermissionsEqual(null, null));
|
||||||
|
|
||||||
|
String[] perms = new String[] {"Blah"};
|
||||||
|
assertFalse(ApkVerifier.requestedPermissionsEqual(perms, null));
|
||||||
|
assertFalse(ApkVerifier.requestedPermissionsEqual(null, perms));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWithoutPrefix() {
|
public void testWithoutPrefix() {
|
||||||
Apk apk = new Apk();
|
Apk apk = new Apk();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user