diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-09-10 20:23:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-09-10 20:23:30 +0000 |
commit | 9b1af1b2a2f0268c3e32e30d3c1ecc00f7969c73 (patch) | |
tree | 62cb58e2fce7ac5de95061af0cd3cd6d7ee3f78f /tests | |
parent | c1673ac906e35ffa21a726248b5c16611a205f0b (diff) | |
parent | 55333840da2f7129b5a2d2e78b612c1101baa9ee (diff) |
Merge "[Mainline Upstream] Add "[IBSS]" string to ScanResult#capabilities"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java index 9544a1283..f46dd915f 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java @@ -776,6 +776,24 @@ public class InformationElementUtilTest extends WifiBaseTest { } /** + * Test Capabilities.generateCapabilitiesString() with the IBSS capability bit set. + * + * Expect the function to return a string with [IBSS] there. + */ + @Test + public void buildCapabilities_IbssCapabilitySet() { + BitSet beaconCap = new BitSet(16); + beaconCap.set(1); + + InformationElementUtil.Capabilities capabilities = + new InformationElementUtil.Capabilities(); + capabilities.from(new InformationElement[0], beaconCap, false); + String result = capabilities.generateCapabilitiesString(); + + assertEquals("[IBSS]", result); + } + + /** * Verify the expectations when building an ExtendedCapabilites IE from data with no bits set. * Both ExtendedCapabilities#isStrictUtf8() and ExtendedCapabilites#is80211McRTTResponder() * should return false. |