Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bbd05e0 authored by Zoey Chen's avatar Zoey Chen Committed by Android (Google) Code Review
Browse files

Merge "[Telephony] Verify the bands[] values are initialized correctly when...

Merge "[Telephony] Verify the bands[] values are initialized correctly when converting." into sc-dev
parents fcfdc3ba f61f3a92
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -22,7 +22,10 @@ import android.telephony.CellInfo;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.stream.Collectors;

/** Unit tests for {@link CellIdentityLte}. */

@@ -253,4 +256,15 @@ public class CellIdentityLteTest extends AndroidTestCase {
        CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p);
        assertEquals(ci, newCi);
    }

    @SmallTest
    public void testBands() {
        android.hardware.radio.V1_5.CellIdentityLte cid =
                new android.hardware.radio.V1_5.CellIdentityLte();
        cid.bands = Arrays.stream(BANDS).boxed().collect(Collectors.toCollection(ArrayList::new));

        CellIdentityLte cellIdentityLte = new CellIdentityLte(cid);
        assertTrue(Arrays.equals(cellIdentityLte.getBands(), BANDS));

    }
}