wifi(implementation): Add unit test framework
We're going to add some non-trivial logic in wifi chip to handle
multiple chip configurations (to support devices with different
capabilities). So, adding a unit test framework in preparation
for testing those changes.
The mocks only mock legacy HAL methods which are in use during chip
configuration & interface creation/deletion.
Bug: 68775880
Test: Compiles
Change-Id: I8575df02f54656f77077d14ac9535ccc974bdff3
diff --git a/wifi/1.2/default/wifi_legacy_hal.cpp b/wifi/1.2/default/wifi_legacy_hal.cpp
index 8289c67..3b056b0 100644
--- a/wifi/1.2/default/wifi_legacy_hal.cpp
+++ b/wifi/1.2/default/wifi_legacy_hal.cpp
@@ -446,7 +446,7 @@
const std::string& iface_name) {
feature_set set;
static_assert(sizeof(set) == sizeof(uint32_t),
- "Some features can not be represented in output");
+ "Some feature_flags can not be represented in output");
wifi_error status = global_func_table_.wifi_get_supported_feature_set(
getIfaceHandle(iface_name), &set);
return {status, static_cast<uint32_t>(set)};
@@ -750,11 +750,11 @@
std::pair<wifi_error, uint32_t> WifiLegacyHal::getLoggerSupportedFeatureSet(
const std::string& iface_name) {
- uint32_t supported_features;
+ uint32_t supported_feature_flags;
wifi_error status =
global_func_table_.wifi_get_logger_supported_feature_set(
- getIfaceHandle(iface_name), &supported_features);
- return {status, supported_features};
+ getIfaceHandle(iface_name), &supported_feature_flags);
+ return {status, supported_feature_flags};
}
wifi_error WifiLegacyHal::startPktFateMonitoring(