Merge "[Wifi] Update language to comply with Android’s inclusive language guidance" am: 5be65d0810
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1380674 Change-Id: I5e6edb60cafac72f5acf7d35151d1e348f28d693
This commit is contained in:
@@ -267,42 +267,42 @@ public class TlvBufferUtilsTest {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testTlvItInvalidSizeT1L0() {
|
||||
final byte[] dummy = {
|
||||
final byte[] testTlv = {
|
||||
0, 1, 2 };
|
||||
final int dummyLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, 0, dummy);
|
||||
final int testLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, 0, testTlv);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testTlvItInvalidSizeTm3L2() {
|
||||
final byte[] dummy = {
|
||||
final byte[] testTlv = {
|
||||
0, 1, 2 };
|
||||
final int dummyLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(-3, 2, dummy);
|
||||
final int testLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(-3, 2, testTlv);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testTlvItInvalidSizeT1Lm2() {
|
||||
final byte[] dummy = {
|
||||
final byte[] testTlv = {
|
||||
0, 1, 2 };
|
||||
final int dummyLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, -2, dummy);
|
||||
final int testLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, -2, testTlv);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testTlvItInvalidSizeT1L3() {
|
||||
final byte[] dummy = {
|
||||
final byte[] testTlv = {
|
||||
0, 1, 2 };
|
||||
final int dummyLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, 3, dummy);
|
||||
final int testLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, 3, testTlv);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testTlvItInvalidSizeT3L1() {
|
||||
final byte[] dummy = {
|
||||
final byte[] testTlv = {
|
||||
0, 1, 2 };
|
||||
final int dummyLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(3, 1, dummy);
|
||||
final int testLength = 3;
|
||||
TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(3, 1, testTlv);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ public class WifiAwareAgentNetworkSpecifierTest {
|
||||
|
||||
Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
|
||||
for (int i = 0; i < numNs; ++i) {
|
||||
nsSet.add(getDummyNetworkSpecifier(10 + i));
|
||||
nsSet.add(getMockNetworkSpecifier(10 + i));
|
||||
}
|
||||
WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier(
|
||||
nsSet.toArray(new WifiAwareNetworkSpecifier[numNs]));
|
||||
@@ -78,7 +78,7 @@ public class WifiAwareAgentNetworkSpecifierTest {
|
||||
@Test
|
||||
public void testEmptyDoesntMatchAnything() {
|
||||
WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier();
|
||||
WifiAwareNetworkSpecifier ns = getDummyNetworkSpecifier(6);
|
||||
WifiAwareNetworkSpecifier ns = getMockNetworkSpecifier(6);
|
||||
collector.checkThat("No match expected", ns.canBeSatisfiedBy(dut), equalTo(false));
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@ public class WifiAwareAgentNetworkSpecifierTest {
|
||||
*/
|
||||
@Test
|
||||
public void testSingleMatch() {
|
||||
WifiAwareNetworkSpecifier nsThis = getDummyNetworkSpecifier(6);
|
||||
WifiAwareNetworkSpecifier nsThis = getMockNetworkSpecifier(6);
|
||||
WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier(nsThis);
|
||||
WifiAwareNetworkSpecifier nsOther = getDummyNetworkSpecifier(8);
|
||||
WifiAwareNetworkSpecifier nsOther = getMockNetworkSpecifier(8);
|
||||
collector.checkThat("Match expected", nsThis.canBeSatisfiedBy(dut), equalTo(true));
|
||||
collector.checkThat("No match expected", nsOther.canBeSatisfiedBy(dut), equalTo(false));
|
||||
}
|
||||
@@ -105,12 +105,12 @@ public class WifiAwareAgentNetworkSpecifierTest {
|
||||
|
||||
Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
|
||||
for (int i = 0; i < numNs; ++i) {
|
||||
nsSet.add(getDummyNetworkSpecifier(10 + i));
|
||||
nsSet.add(getMockNetworkSpecifier(10 + i));
|
||||
}
|
||||
|
||||
WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier(
|
||||
nsSet.toArray(new WifiAwareNetworkSpecifier[numNs]));
|
||||
WifiAwareNetworkSpecifier nsOther = getDummyNetworkSpecifier(10000);
|
||||
WifiAwareNetworkSpecifier nsOther = getMockNetworkSpecifier(10000);
|
||||
|
||||
for (WifiAwareNetworkSpecifier nsThis: nsSet) {
|
||||
collector.checkThat("Match expected", nsThis.canBeSatisfiedBy(dut), equalTo(true));
|
||||
@@ -127,13 +127,13 @@ public class WifiAwareAgentNetworkSpecifierTest {
|
||||
|
||||
Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
|
||||
for (int i = 0; i < numNs; ++i) {
|
||||
nsSet.add(getDummyNetworkSpecifier(10 + i));
|
||||
nsSet.add(getMockNetworkSpecifier(10 + i));
|
||||
}
|
||||
|
||||
WifiAwareAgentNetworkSpecifier oldNs = new WifiAwareAgentNetworkSpecifier(
|
||||
nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
|
||||
|
||||
nsSet.add(getDummyNetworkSpecifier(100 + numNs));
|
||||
nsSet.add(getMockNetworkSpecifier(100 + numNs));
|
||||
WifiAwareAgentNetworkSpecifier newNs = new WifiAwareAgentNetworkSpecifier(
|
||||
nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
|
||||
|
||||
@@ -149,13 +149,13 @@ public class WifiAwareAgentNetworkSpecifierTest {
|
||||
|
||||
Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
|
||||
for (int i = 0; i < numNs; ++i) {
|
||||
nsSet.add(getDummyNetworkSpecifier(10 + i));
|
||||
nsSet.add(getMockNetworkSpecifier(10 + i));
|
||||
}
|
||||
|
||||
WifiAwareAgentNetworkSpecifier newNs = new WifiAwareAgentNetworkSpecifier(
|
||||
nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
|
||||
|
||||
nsSet.add(getDummyNetworkSpecifier(100 + numNs));
|
||||
nsSet.add(getMockNetworkSpecifier(100 + numNs));
|
||||
WifiAwareAgentNetworkSpecifier oldNs = new WifiAwareAgentNetworkSpecifier(
|
||||
nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
|
||||
|
||||
@@ -165,10 +165,10 @@ public class WifiAwareAgentNetworkSpecifierTest {
|
||||
// utilities
|
||||
|
||||
/**
|
||||
* Returns a WifiAwareNetworkSpecifier with dummy (but valid) entries. Each can be
|
||||
* Returns a WifiAwareNetworkSpecifier with mock (but valid) entries. Each can be
|
||||
* differentiated (made unique) by specifying a different client ID.
|
||||
*/
|
||||
WifiAwareNetworkSpecifier getDummyNetworkSpecifier(int clientId) {
|
||||
WifiAwareNetworkSpecifier getMockNetworkSpecifier(int clientId) {
|
||||
return new WifiAwareNetworkSpecifier(WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_OOB,
|
||||
WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR, clientId, 0, 0, new byte[6],
|
||||
null, null, 10, 5, 0);
|
||||
|
||||
@@ -1570,7 +1570,7 @@ public class WifiAwareManagerTest {
|
||||
public void testWifiAwareNetworkCapabilitiesParcel() throws UnknownHostException {
|
||||
final Inet6Address inet6 = MacAddress.fromString(
|
||||
"11:22:33:44:55:66").getLinkLocalIpv6FromEui48Mac();
|
||||
// note: dummy scope = 5
|
||||
// note: placeholder scope = 5
|
||||
final Inet6Address inet6Scoped = Inet6Address.getByAddress(null, inet6.getAddress(), 5);
|
||||
final int port = 5;
|
||||
final int transportProtocol = 6;
|
||||
|
||||
Reference in New Issue
Block a user