Make test with Clang

This commit is contained in:
Kamil Ritz
2020-02-01 16:19:59 +01:00
committed by Mathieu Bresciani
parent 3fa5f501ae
commit 7c179b39b8
5 changed files with 7 additions and 15 deletions
+4 -6
View File
@@ -27,9 +27,8 @@ jobs:
run: make
- name: clean build
run: make clean
# TODO: This is not running at the moment
#- name: main test
# run: make test
- name: main test
run: make test
Mac-OS:
runs-on: macos-latest
steps:
@@ -38,6 +37,5 @@ jobs:
run: make
- name: clean build
run: make clean
# TODO: This is not running at the moment
#- name: main test
# run: make test
- name: main test
run: make test
-7
View File
@@ -41,10 +41,3 @@ endif()
# Add googletest, defines gtest and gtest_main targets
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src ${CMAKE_CURRENT_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL)
# Remove visibility.h from the compile flags for gtest because of poisoned exit()
get_target_property(GTEST_COMPILE_FLAGS gtest COMPILE_OPTIONS)
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "-include")
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "visibility.h")
set_target_properties(gtest PROPERTIES COMPILE_OPTIONS "${GTEST_COMPILE_FLAGS}")
+1
View File
@@ -47,6 +47,7 @@
#include <iostream>
#include <sstream>
#include <vector>
#include <array>
#include "imu.h"
#include "mag.h"
+1 -1
View File
@@ -96,7 +96,7 @@ TEST_F(EkfAirspeedTest, testWindVelocityEstimation)
EXPECT_TRUE(matrix::isEqual(vel, simulated_velocity_earth));
const Vector3f vel_wind_expected = simulated_velocity_earth - R_to_earth_sim * (Vector3f(airspeed_body(0), airspeed_body(1), 0.0f));
EXPECT_TRUE(matrix::isEqual(vel_wind_earth, Vector2f(vel_wind_expected.slice<2,1>(0,0))));
EXPECT_FLOAT_EQ(height_before_pressure_correction, 0.0f);
EXPECT_NEAR(height_before_pressure_correction, 0.0f, 1e-5f);
// Apply height correction
const float static_pressure_coef_xp = 1.0f;
+1 -1
View File
@@ -94,7 +94,7 @@ TEST_P(EkfImuSamplingTest, imuSamplingAtMultipleRates)
EXPECT_TRUE(matrix::isEqual(accel, imu_sample_buffered.delta_vel/imu_sample_buffered.delta_vel_dt, 1e-7f));
}
INSTANTIATE_TEST_CASE_P(imuSamplingAtMultipleRates,
INSTANTIATE_TEST_SUITE_P(imuSamplingAtMultipleRates,
EkfImuSamplingTest,
::testing::Values(
std::make_tuple<float,float,Vector3f,Vector3f>(1.0f, 1.0f,Vector3f{0.0f,0.0f,0.0f},Vector3f{-0.46f,0.87f,0.20f}),