11 #include <gtest/gtest.h>
13 namespace etrobocon2018_test {
16 TEST(SpeedControlTest, calculateSpeedForPidTest1)
21 sp.
setPid(2.0, 4.8, 0.024, 150.0);
24 ASSERT_LE(value, 100);
28 TEST(SpeedControlTest, calculateSpeedForPidTest2)
33 sp.
setPid(2.0, 4.8, 0.024, 150.0);
34 for(
int i = 0; i < 25; i++) {
42 ASSERT_GE(value, -100);
56 TEST(SpeedControlTest, calcDistance4msTest1)
62 circle = 2 * 3.14 * 81;
69 ASSERT_EQ(value, (
int)circle);
std::int8_t calcDistance4ms(std::int32_t curAngleL, std::int32_t curAngleR)
std::int32_t calculateSpeedForPid(std::int32_t curAngleL, std::int32_t curAngleR)
void setPid(double p_gain_, double i_gain_, double d_gain_, double target_)
TEST(AIAnswerArrayTest, construct)
int calcDistance4ms(int curAngleL, int curAngleR)