Update minSdk
values in UtilTest
These were missed when upgrading to both SDK 19 and 21, but they now cause failures like: ``` Caused by: java.lang.RuntimeException: Failed to parse package buildout/intermediates/apk_for_local_test/debugUnitTest/packageDebugUnitTestForUnitTest/apk-for-local-test.ap_: buildout/intermediates/apk_for_local_test/debugUnitTest/packageDebugUnitTestForUnitTest/apk-for-local-test.ap_ (at Binary XML file line #20): Requires newer sdk version #21 (current version is #19) at org.robolectric.shadows.ShadowPackageParser.callParsePackage(ShadowPackageParser.java:61) ... 20 more ``` #cherrypick PiperOrigin-RevId: 670241471
This commit is contained in:
parent
1d9276863c
commit
4562c781ed
@ -1570,7 +1570,7 @@ public class UtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(minSdk = 16) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
@Config(minSdk = 21) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
public void contentEquals_sparseArraysWithEqualContent_returnsTrue() {
|
||||
SparseArray<Integer> sparseArray1 = new SparseArray<>();
|
||||
sparseArray1.put(1, 2);
|
||||
@ -1583,7 +1583,7 @@ public class UtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(minSdk = 16) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
@Config(minSdk = 21) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
public void contentEquals_sparseArraysWithDifferentContents_returnsFalse() {
|
||||
SparseArray<Integer> sparseArray1 = new SparseArray<>();
|
||||
sparseArray1.put(1, 2);
|
||||
@ -1599,7 +1599,7 @@ public class UtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(minSdk = 16) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
@Config(minSdk = 21) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
public void contentHashCode_sparseArraysWithEqualContent_returnsEqualContentHashCode() {
|
||||
SparseArray<Integer> sparseArray1 = new SparseArray<>();
|
||||
sparseArray1.put(1, 2);
|
||||
@ -1612,7 +1612,7 @@ public class UtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(minSdk = 16) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
@Config(minSdk = 21) // Specifies the minimum SDK to enforce the test to run with all API levels.
|
||||
public void contentHashCode_sparseArraysWithDifferentContent_returnsDifferentContentHashCode() {
|
||||
// In theory this is not guaranteed though, adding this test to ensure a sensible
|
||||
// contentHashCode implementation.
|
||||
|
Loading…
x
Reference in New Issue
Block a user