Skip to content

Commit c61837b

Browse files
committed
added test
Signed-off-by: Nate Koenig <natekoenig@gmail.com>
1 parent 1cab2f6 commit c61837b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/PID_TEST.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ TEST(PidTest, Update)
178178
pid.SetIMin(0.0);
179179
result = pid.Update(5.0, 1.0, std::chrono::duration<double>(10.0));
180180
EXPECT_DOUBLE_EQ(result, -5.5);
181+
182+
result = pid.Update(5.0, 1.0, std::chrono::duration<double>(0.0));
183+
EXPECT_DOUBLE_EQ(result, 0);
181184
}
182185

183186
/////////////////////////////////////////////////

0 commit comments

Comments
 (0)