Skip to content
Snippets Groups Projects
Unverified Commit 311676e4 authored by Charles Javerliat's avatar Charles Javerliat
Browse files

test: Update odometer init tests

parent a1aa90c0
No related branches found
No related tags found
1 merge request!16Refactoring
Pipeline #217 passed with stage
in 3 minutes and 27 seconds
......@@ -44,18 +44,22 @@ void test_odometer_init_values()
Encoder rightEncoder(D10, D12, 1000);
Odometer odom(geometry, leftEncoder, rightEncoder);
// When creating the odometer, position should be all zeroes, same for speed
TEST_ASSERT_EQUAL(0, odom.getPosition().x);
TEST_ASSERT_EQUAL(0, odom.getPosition().y);
TEST_ASSERT_EQUAL(0, odom.getPosition().theta);
TEST_ASSERT_EQUAL(0, odom.getSpeed().linearSpeed);
TEST_ASSERT_EQUAL(0, odom.getSpeed().angularSpeed);
TEST_ASSERT_EQUAL(0, odom.getSpeed().leftWheelSpeed);
TEST_ASSERT_EQUAL(0, odom.getSpeed().rightWheelSpeed);
}
int main()
{
// NOTE!!! Wait for >2 secs
// if board doesn't support software reset via Serial.DTR/RTS
// Wait for serial to setup
wait_ms(2000);
UNITY_BEGIN(); // IMPORTANT LINE!
UNITY_BEGIN();
RUN_TEST(test_led_builtin_pin_number);
RUN_TEST(test_led_state_high);
RUN_TEST(test_led_state_low);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment