am 3a6d8f54: am 90d5bd8d: am feb362a5: am a0d3bfbe: am 5c9d0de1: am 545dd853: am 9a425aa7: am 159aa735: am d4031809: am 48c95c43: Fix build breakage in older branches by avoiding <> notation
* commit '3a6d8f5473f2451a0bdf13d4cc1d31e419d23f0c': Fix build breakage in older branches by avoiding <> notation
This commit is contained in:
@@ -11,7 +11,7 @@ public class ParceledListSliceTest extends TestCase {
|
|||||||
|
|
||||||
public void testSmallList() throws Exception {
|
public void testSmallList() throws Exception {
|
||||||
final int objectCount = 100;
|
final int objectCount = 100;
|
||||||
List<SmallObject> list = new ArrayList<>();
|
List<SmallObject> list = new ArrayList<SmallObject>();
|
||||||
for (int i = 0; i < objectCount; i++) {
|
for (int i = 0; i < objectCount; i++) {
|
||||||
list.add(new SmallObject(i * 2, (i * 2) + 1));
|
list.add(new SmallObject(i * 2, (i * 2) + 1));
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ public class ParceledListSliceTest extends TestCase {
|
|||||||
|
|
||||||
Parcel parcel = Parcel.obtain();
|
Parcel parcel = Parcel.obtain();
|
||||||
try {
|
try {
|
||||||
parcel.writeParcelable(new ParceledListSlice<>(list), 0);
|
parcel.writeParcelable(new ParceledListSlice<SmallObject>(list), 0);
|
||||||
parcel.setDataPosition(0);
|
parcel.setDataPosition(0);
|
||||||
slice = parcel.readParcelable(getClass().getClassLoader());
|
slice = parcel.readParcelable(getClass().getClassLoader());
|
||||||
} finally {
|
} finally {
|
||||||
@@ -56,7 +56,7 @@ public class ParceledListSliceTest extends TestCase {
|
|||||||
final int thresholdBytes = 256 * 1024;
|
final int thresholdBytes = 256 * 1024;
|
||||||
final int objectCount = thresholdBytes / measureLargeObject();
|
final int objectCount = thresholdBytes / measureLargeObject();
|
||||||
|
|
||||||
List<LargeObject> list = new ArrayList<>();
|
List<LargeObject> list = new ArrayList<LargeObject>();
|
||||||
for (int i = 0; i < objectCount; i++) {
|
for (int i = 0; i < objectCount; i++) {
|
||||||
list.add(new LargeObject(
|
list.add(new LargeObject(
|
||||||
i * 5,
|
i * 5,
|
||||||
@@ -71,7 +71,7 @@ public class ParceledListSliceTest extends TestCase {
|
|||||||
|
|
||||||
Parcel parcel = Parcel.obtain();
|
Parcel parcel = Parcel.obtain();
|
||||||
try {
|
try {
|
||||||
parcel.writeParcelable(new ParceledListSlice<>(list), 0);
|
parcel.writeParcelable(new ParceledListSlice<LargeObject>(list), 0);
|
||||||
parcel.setDataPosition(0);
|
parcel.setDataPosition(0);
|
||||||
slice = parcel.readParcelable(getClass().getClassLoader());
|
slice = parcel.readParcelable(getClass().getClassLoader());
|
||||||
} finally {
|
} finally {
|
||||||
@@ -95,7 +95,7 @@ public class ParceledListSliceTest extends TestCase {
|
|||||||
* Test that only homogeneous elements may be unparceled.
|
* Test that only homogeneous elements may be unparceled.
|
||||||
*/
|
*/
|
||||||
public void testHomogeneousElements() throws Exception {
|
public void testHomogeneousElements() throws Exception {
|
||||||
List<BaseObject> list = new ArrayList<>();
|
List<BaseObject> list = new ArrayList<BaseObject>();
|
||||||
list.add(new LargeObject(0, 1, 2, 3, 4));
|
list.add(new LargeObject(0, 1, 2, 3, 4));
|
||||||
list.add(new SmallObject(5, 6));
|
list.add(new SmallObject(5, 6));
|
||||||
list.add(new SmallObject(7, 8));
|
list.add(new SmallObject(7, 8));
|
||||||
|
|||||||
Reference in New Issue
Block a user