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_mode_controller.h b/wifi/1.2/default/wifi_mode_controller.h
index 839bf9e..e54fa6e 100644
--- a/wifi/1.2/default/wifi_mode_controller.h
+++ b/wifi/1.2/default/wifi_mode_controller.h
@@ -37,15 +37,16 @@
class WifiModeController {
public:
WifiModeController();
+ virtual ~WifiModeController() = default;
// Checks if a firmware mode change is necessary to support the specified
// iface type operations.
- bool isFirmwareModeChangeNeeded(IfaceType type);
+ virtual bool isFirmwareModeChangeNeeded(IfaceType type);
// Change the firmware mode to support the specified iface type operations.
- bool changeFirmwareMode(IfaceType type);
+ virtual bool changeFirmwareMode(IfaceType type);
// Unload the driver. This should be invoked whenever |IWifi.stop()| is
// invoked.
- bool deinitialize();
+ virtual bool deinitialize();
private:
std::unique_ptr<wifi_hal::DriverTool> driver_tool_;