Skip to content

Commit

Permalink
Update RobotController_test_hardware.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Feb 14, 2024
1 parent df8e38e commit 19aa686
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions libs/RobotKit/tests/RobotController_test_hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

#include "./RobotController_test.h"
#include "mocks/leka/DeepSleepEnabled.h"

TEST_F(RobotControllerTest, stopActuators)
{
Expand Down Expand Up @@ -32,18 +33,12 @@ TEST_F(RobotControllerTest, stopActuatorsAndLcd)

TEST_F(RobotControllerTest, suspendHardwareForDeepSleep)
{
EXPECT_CALL(mock_motor_left, enableDeepSleep);
EXPECT_CALL(mock_motor_right, enableDeepSleep);
EXPECT_CALL(mock_lcd, enableDeepSleep);
// TODO: Expect_call of RFID

auto components = std::to_array<interface::DeepSleepEnabled *>({
&mock_motor_left,
&mock_motor_right,
&mock_lcd,
});
mock::DeepSleepEnabled mock_deep_sleep_enabled {};

auto components = std::to_array<interface::DeepSleepEnabled *>({&mock_deep_sleep_enabled});
rc.registerDeepSleepEnabledComponents(components);

EXPECT_CALL(mock_deep_sleep_enabled, enableDeepSleep);
rc.suspendHardwareForDeepSleep();
}

Expand Down

0 comments on commit 19aa686

Please sign in to comment.