From 405a0276c647132cdcaddfe2f2054e3033506c44 Mon Sep 17 00:00:00 2001 From: Yann Locatelli Date: Fri, 26 Jul 2024 12:54:17 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20(RobotController):=20Fix=20expected?= =?UTF-8?q?=20calls=20for=20BLE=20on=20DeepSleep=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/RobotKit/tests/RobotController_test_hardware.cpp | 1 + libs/RobotKit/tests/StateMachine_test.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/libs/RobotKit/tests/RobotController_test_hardware.cpp b/libs/RobotKit/tests/RobotController_test_hardware.cpp index dca096f9a..dc5512630 100644 --- a/libs/RobotKit/tests/RobotController_test_hardware.cpp +++ b/libs/RobotKit/tests/RobotController_test_hardware.cpp @@ -39,6 +39,7 @@ TEST_F(RobotControllerTest, suspendHardwareForDeepSleep) rc.registerDeepSleepEnabledComponents(components); EXPECT_CALL(mock_deep_sleep_enabled, enableDeepSleep); + EXPECT_CALL(mbed_mock_gap, disconnect); rc.suspendHardwareForDeepSleep(); } diff --git a/libs/RobotKit/tests/StateMachine_test.cpp b/libs/RobotKit/tests/StateMachine_test.cpp index de9afa257..45db4abcb 100644 --- a/libs/RobotKit/tests/StateMachine_test.cpp +++ b/libs/RobotKit/tests/StateMachine_test.cpp @@ -272,6 +272,7 @@ TEST_F(StateMachineTest, stateDeepSleepingEventBleConnection) sm.set_current_states(lksm::state::deep_sleeping); EXPECT_CALL(mock_rc, wakeUp); + EXPECT_CALL(mock_rc, startConnectionBehavior); sm.process_event(lksm::event::ble_connection {});