Skip to content

Commit

Permalink
✅ (ut): CoreLCD - test enable/disable deep sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Feb 2, 2024
1 parent 05cc12a commit 069d4f4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/CoreVideo/tests/CoreLCDDriverOTM8009A_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ TEST_F(CoreOTM8009ATest, turnOff)
otm.turnOff();
}

TEST_F(CoreOTM8009ATest, enableDeepSleep)
{
EXPECT_CALL(backlightmock, enableDeepSleep);

otm.enableDeepSleep();
}

TEST_F(CoreOTM8009ATest, disableDeepSleep)
{
EXPECT_CALL(backlightmock, disableDeepSleep);

otm.disableDeepSleep();
}

TEST_F(CoreOTM8009ATest, setBrightness)
{
auto value = 0.5F;
Expand Down
14 changes: 14 additions & 0 deletions drivers/CoreVideo/tests/CoreLCD_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ TEST_F(CoreLCDTest, turnOff)
corelcd.turnOff();
}

TEST_F(CoreLCDTest, enableDeepSleep)
{
EXPECT_CALL(lcddrivermock, enableDeepSleep);

corelcd.enableDeepSleep();
}

TEST_F(CoreLCDTest, disableDeepSleep)
{
EXPECT_CALL(lcddrivermock, disableDeepSleep);

corelcd.disableDeepSleep();
}

TEST_F(CoreLCDTest, setBrightness)
{
EXPECT_CALL(lcddrivermock, setBrightness(An<float>())).Times(1);
Expand Down

0 comments on commit 069d4f4

Please sign in to comment.