Skip to content

Commit

Permalink
Remove equal operator PID test
Browse files Browse the repository at this point in the history
ImplPtr makes this test irrelevant

Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Jan 30, 2022
1 parent ff236b2 commit db3c177
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/PID_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,40 +107,6 @@ TEST(PidTest, SetValues)
}
}

/////////////////////////////////////////////////
TEST(PidTest, EqualOperatorCornerCase)
{
math::PID pid(1.0, 2.1, -4.5, 10.5, 1.4, 45, -35, 1.23);
EXPECT_DOUBLE_EQ(pid.PGain(), 1.0);
EXPECT_DOUBLE_EQ(pid.IGain(), 2.1);
EXPECT_DOUBLE_EQ(pid.DGain(), -4.5);
EXPECT_DOUBLE_EQ(pid.IMax(), 10.5);
EXPECT_DOUBLE_EQ(pid.IMin(), 1.4);
EXPECT_DOUBLE_EQ(pid.CmdMax(), 45.0);
EXPECT_DOUBLE_EQ(pid.CmdMin(), -35.0);
EXPECT_DOUBLE_EQ(pid.CmdOffset(), 1.23);
EXPECT_DOUBLE_EQ(pid.Cmd(), 0.0);

#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wself-assign-overloaded"
#endif
pid = pid;
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif

EXPECT_DOUBLE_EQ(pid.PGain(), 1.0);
EXPECT_DOUBLE_EQ(pid.IGain(), 2.1);
EXPECT_DOUBLE_EQ(pid.DGain(), -4.5);
EXPECT_DOUBLE_EQ(pid.IMax(), 10.5);
EXPECT_DOUBLE_EQ(pid.IMin(), 1.4);
EXPECT_DOUBLE_EQ(pid.CmdMax(), 45.0);
EXPECT_DOUBLE_EQ(pid.CmdMin(), -35.0);
EXPECT_DOUBLE_EQ(pid.CmdOffset(), 1.23);
EXPECT_DOUBLE_EQ(pid.Cmd(), 0.0);
}

/////////////////////////////////////////////////
TEST(PidTest, Update)
{
Expand Down

0 comments on commit db3c177

Please sign in to comment.