summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java18
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 dd567053c..011283b79 100644
--- a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
@@ -775,6 +775,24 @@ public class InformationElementUtilTest {
}
/**
+ * 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.