Skip to content

Commit

Permalink
test: add unit test for configuration from component and mav_type
Browse files Browse the repository at this point in the history
  • Loading branch information
cramke committed Jan 1, 2025
1 parent 2d629a1 commit d0e9089
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mavsdk/core/mavsdk_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ TEST(Mavsdk, version)
Mavsdk mavsdk{Mavsdk::Configuration{ComponentType::GroundStation}};
ASSERT_GT(mavsdk.version().size(), 5);
}

TEST(Mavsdk, Configuration)
{
Mavsdk::Configuration configuration{ComponentType::Autopilot};

ASSERT_EQ(configuration.get_mav_type(), MAV_TYPE::MAV_TYPE_GENERIC); // Default
configuration.set_mav_type(MAV_TYPE::MAV_TYPE_FIXED_WING);
ASSERT_EQ(configuration.get_mav_type(), MAV_TYPE::MAV_TYPE_FIXED_WING);
}

0 comments on commit d0e9089

Please sign in to comment.