mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 05:53:35 +08:00
unittests: Remove geomag tests which are now covered in systemcmds tests.
This commit is contained in:
committed by
Lorenz Meier
parent
614853b023
commit
20e7bd082a
@@ -110,5 +110,3 @@ add_executable(param_test param_test.cpp uorb_stub.cpp
|
|||||||
${PX4_SRC}/modules/systemlib/param/param.c)
|
${PX4_SRC}/modules/systemlib/param/param.c)
|
||||||
target_link_libraries(param_test ${PX4_PLATFORM})
|
target_link_libraries(param_test ${PX4_PLATFORM})
|
||||||
add_gtest(param_test)
|
add_gtest(param_test)
|
||||||
add_executable(geomag_test geomag_test.cpp)
|
|
||||||
add_gtest(geomag_test)
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
#include <geo_lookup/geo_mag_declination.c>
|
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
|
||||||
|
|
||||||
TEST(GeoMagTest, IndexBoundsCheck)
|
|
||||||
{
|
|
||||||
unsigned index = get_lookup_table_index(90.0f, SAMPLING_MIN_LAT, SAMPLING_MAX_LAT);
|
|
||||||
ASSERT_EQ((unsigned)11, index);
|
|
||||||
index = get_lookup_table_index(-90.0f, SAMPLING_MIN_LAT, SAMPLING_MAX_LAT);
|
|
||||||
ASSERT_EQ((unsigned)0, index);
|
|
||||||
index = get_lookup_table_index(180.0f, SAMPLING_MIN_LON, SAMPLING_MAX_LON);
|
|
||||||
ASSERT_EQ((unsigned)35, index);
|
|
||||||
index = get_lookup_table_index(-180.0f, SAMPLING_MIN_LON, SAMPLING_MAX_LON);
|
|
||||||
ASSERT_EQ((unsigned)0, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user