Merge "[CTS] Fix CTS failure in mainline train" into android13-tests-dev
This commit is contained in:
@@ -36,7 +36,7 @@ import java.util.Arrays;
|
|||||||
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
||||||
public class DataElementTest {
|
public class DataElementTest {
|
||||||
|
|
||||||
private static final int KEY = 1234;
|
private static final int KEY = 1;
|
||||||
private static final byte[] VALUE = new byte[]{1, 1, 1, 1};
|
private static final byte[] VALUE = new byte[]{1, 1, 1, 1};
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import static com.google.common.truth.Truth.assertThat;
|
|||||||
|
|
||||||
import android.nearby.NearbyDevice;
|
import android.nearby.NearbyDevice;
|
||||||
import android.nearby.NearbyDeviceParcelable;
|
import android.nearby.NearbyDeviceParcelable;
|
||||||
import android.nearby.PublicCredential;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
|
|
||||||
@@ -60,32 +59,6 @@ public class NearbyDeviceParcelableTest {
|
|||||||
.setData(SCAN_DATA);
|
.setData(SCAN_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Verify toString returns expected string. */
|
|
||||||
@Test
|
|
||||||
@SdkSuppress(minSdkVersion = 33, codeName = "T")
|
|
||||||
public void testToString() {
|
|
||||||
PublicCredential publicCredential =
|
|
||||||
new PublicCredential.Builder(
|
|
||||||
new byte[] {1},
|
|
||||||
new byte[] {2},
|
|
||||||
new byte[] {3},
|
|
||||||
new byte[] {4},
|
|
||||||
new byte[] {5})
|
|
||||||
.build();
|
|
||||||
NearbyDeviceParcelable nearbyDeviceParcelable =
|
|
||||||
mBuilder.setFastPairModelId(null)
|
|
||||||
.setData(null)
|
|
||||||
.setPublicCredential(publicCredential)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
assertThat(nearbyDeviceParcelable.toString())
|
|
||||||
.isEqualTo(
|
|
||||||
"NearbyDeviceParcelable[scanType=2, name=testDevice, medium=BLE, "
|
|
||||||
+ "txPower=0, rssi=-60, action=0, bluetoothAddress="
|
|
||||||
+ BLUETOOTH_ADDRESS
|
|
||||||
+ ", fastPairModelId=null, data=null, salt=null]");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SdkSuppress(minSdkVersion = 33, codeName = "T")
|
@SdkSuppress(minSdkVersion = 33, codeName = "T")
|
||||||
public void test_defaultNullFields() {
|
public void test_defaultNullFields() {
|
||||||
|
|||||||
Reference in New Issue
Block a user