Skip to content

Commit

Permalink
Update shift_controller_tests.cpp
Browse files Browse the repository at this point in the history
Updated Midgear State Cases
  • Loading branch information
NikhilNRN authored Jul 24, 2024
1 parent c6c6729 commit 7da7f2e
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions Firmware/Tests/Src/Application/shift_controller_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,28 @@ TEST_F(ShiftControllerFixture, LowGear_ToMidGear) {
//**************************************************************************
// MidGear State Cases
//**************************************************************************
TEST_F(ShiftControllerFixture, MidGear_ToLowGear) {
GTEST_SKIP() << "TODO:"
<< "\nImplement downshift."
<< "Track current physical gear. Must be at 2.";
TEST_F(ShiftControllerFixture, MidGear_ToLowGear)
{
shift_controller_.SetMidGearState();
EXPECT_TRUE(shift_controller_.IsMidGearState());

rpm_ = 4999;
PerformAndCheckDownshiftRequest(true);

shift_controller_.Run();
EXPECT_TRUE(shift_controller_.IsLowGearState());
}

TEST_F(ShiftControllerFixture, MidGear_ToHighGear) {
GTEST_SKIP() << "TODO:"
<< "\nImplement upshift."
<< "Track current physical gear. Must be at 5.";
TEST_F(ShiftControllerFixture, MidGear_ToHighGear)
{
shift_controller_.SetMidGearState();
EXPECT_TRUE(shift_controller_.IsMidGearState());

rpm_ = 5001;
PerformAndCheckUpshiftRequest(true);

shift_controller_.Run();
EXPECT_TRUE(shift_controller_.IsHighGearState());
}


Expand Down

0 comments on commit 7da7f2e

Please sign in to comment.