unittests: Remove geomag tests which are now covered in systemcmds tests.

This commit is contained in:
Stephan Brown 2017-02-02 15:21:50 -08:00 committed by Lorenz Meier
parent 614853b023
commit 20e7bd082a
2 changed files with 0 additions and 18 deletions

View File

@ -110,5 +110,3 @@ add_executable(param_test param_test.cpp uorb_stub.cpp
${PX4_SRC}/modules/systemlib/param/param.c)
target_link_libraries(param_test ${PX4_PLATFORM})
add_gtest(param_test)
add_executable(geomag_test geomag_test.cpp)
add_gtest(geomag_test)

View File

@ -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);
}