From d0e9089d43085535667e58d577a0933bc4e66e35 Mon Sep 17 00:00:00 2001 From: Carsten Ramke Date: Wed, 1 Jan 2025 15:29:39 +0100 Subject: [PATCH] test: add unit test for configuration from component and mav_type --- src/mavsdk/core/mavsdk_test.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mavsdk/core/mavsdk_test.cpp b/src/mavsdk/core/mavsdk_test.cpp index d5b5cf976..15ae11463 100644 --- a/src/mavsdk/core/mavsdk_test.cpp +++ b/src/mavsdk/core/mavsdk_test.cpp @@ -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); +} \ No newline at end of file