Skip to content

Commit

Permalink
Removed non-existent function call. Re-added GTEST_SKIP notes for tes…
Browse files Browse the repository at this point in the history
…t cases lacking complete implementations
  • Loading branch information
crsz20 committed Jul 27, 2024
1 parent 799878f commit f7b6dcf
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions Firmware/Tests/Src/Application/shift_controller_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,11 @@ TEST_F(ShiftControllerFixture, LowGear_ToMidGear) {
//**************************************************************************
// MidGear State Cases
//**************************************************************************
TEST_F(ShiftControllerFixture, MidGear_ToLowGear)
{
TEST_F(ShiftControllerFixture, MidGear_ToLowGear) {
GTEST_SKIP() << "TODO:"
<< "\nImplement downshift."
<< "Track current physical gear. Must be at 2.";

shift_controller_.SetMidGearState();
EXPECT_TRUE(shift_controller_.IsMidGearState());

Expand All @@ -170,10 +173,16 @@ TEST_F(ShiftControllerFixture, MidGear_ToLowGear)

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



}

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

shift_controller_.SetMidGearState();
EXPECT_TRUE(shift_controller_.IsMidGearState());

Expand All @@ -182,6 +191,8 @@ TEST_F(ShiftControllerFixture, MidGear_ToHighGear)

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


}


Expand All @@ -201,8 +212,9 @@ TEST_F(ShiftControllerFixture, HighGear_IgnoreUpshiftRequest)
EXPECT_TRUE(shift_controller_.IsHighGearState());
}

TEST_F(ShiftControllerFixture, HighGear_ToMidGear)
{
TEST_F(ShiftControllerFixture, HighGear_ToMidGear) {
GTEST_SKIP() << "TODO: \nImplement downshift.";

shift_controller_.SetHighGearState();
EXPECT_TRUE(shift_controller_.IsHighGearState());

Expand All @@ -211,42 +223,41 @@ TEST_F(ShiftControllerFixture, HighGear_ToMidGear)

shift_controller_.Run();
EXPECT_TRUE(shift_controller_.IsMidGearState());


}


//**************************************************************************
// Upshift Conditions
//**************************************************************************
TEST_F(ShiftControllerFixture, UpshiftConditions_Satisfied)
{
TEST_F(ShiftControllerFixture, UpshiftConditions_Satisfied) {
rpm_ = 5001;
EXPECT_TRUE(shift_controller_.CheckUpshiftConditions());
}

TEST_F(ShiftControllerFixture, UpshiftConditions_GearAboveThreshold)
{
TEST_F(ShiftControllerFixture, UpshiftConditions_GearAboveThreshold) {
shift_controller_.SetHighGearState();
EXPECT_FALSE(shift_controller_.CheckUpshiftConditions());
}

TEST_F(ShiftControllerFixture, UpshiftConditions_InNeutral)
{
shift_controller_.SetNeutralState();
TEST_F(ShiftControllerFixture, UpshiftConditions_InNeutral) {
EXPECT_FALSE(shift_controller_.CheckUpshiftConditions());
}

TEST_F(ShiftControllerFixture, UpshiftConditions_RpmTooLow)
{
TEST_F(ShiftControllerFixture, UpshiftConditions_RpmTooLow) {
rpm_ = 5000;
EXPECT_FALSE(shift_controller_.CheckUpshiftConditions());
}

TEST_F(ShiftControllerFixture, UpshiftConditions_WheelSpeedNotCloseEnough)
{
TEST_F(ShiftControllerFixture, UpshiftConditions_WheelSpeedNotCloseEnough) {
GTEST_SKIP() << "TODO: Set wheel speed and rpm far apart from each. Should fail.";

wheel_speeds_[0] = 10.0f;
wheel_speeds_[1] = 30.0f;
rpm_ = 5001;
EXPECT_FALSE(shift_controller_.CheckUpshiftConditions());

}

//**************************************************************************
Expand Down Expand Up @@ -282,7 +293,6 @@ TEST_F(ShiftControllerFixture, DownshiftConditions_TpsTooLow)

TEST_F(ShiftControllerFixture, DownshiftConditions_GearDisengaged)
{
shift_controller_.SetNeutralState();
rpm_ = 8999;
tps_ = 30.0f;
EXPECT_FALSE(shift_controller_.CheckDownshiftConditions());
Expand Down

0 comments on commit f7b6dcf

Please sign in to comment.