Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 7c179b3

Browse files
kamilritzbresch
authored andcommitted
Make test with Clang
1 parent 3fa5f50 commit 7c179b3

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

.github/workflows/build_tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ jobs:
2727
run: make
2828
- name: clean build
2929
run: make clean
30-
# TODO: This is not running at the moment
31-
#- name: main test
32-
# run: make test
30+
- name: main test
31+
run: make test
3332
Mac-OS:
3433
runs-on: macos-latest
3534
steps:
@@ -38,6 +37,5 @@ jobs:
3837
run: make
3938
- name: clean build
4039
run: make clean
41-
# TODO: This is not running at the moment
42-
#- name: main test
43-
# run: make test
40+
- name: main test
41+
run: make test

test/gtest.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,3 @@ endif()
4141

4242
# Add googletest, defines gtest and gtest_main targets
4343
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src ${CMAKE_CURRENT_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL)
44-
45-
# Remove visibility.h from the compile flags for gtest because of poisoned exit()
46-
get_target_property(GTEST_COMPILE_FLAGS gtest COMPILE_OPTIONS)
47-
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "-include")
48-
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "visibility.h")
49-
set_target_properties(gtest PROPERTIES COMPILE_OPTIONS "${GTEST_COMPILE_FLAGS}")
50-

test/sensor_simulator/sensor_simulator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <iostream>
4848
#include <sstream>
4949
#include <vector>
50+
#include <array>
5051

5152
#include "imu.h"
5253
#include "mag.h"

test/test_EKF_airspeed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ TEST_F(EkfAirspeedTest, testWindVelocityEstimation)
9696
EXPECT_TRUE(matrix::isEqual(vel, simulated_velocity_earth));
9797
const Vector3f vel_wind_expected = simulated_velocity_earth - R_to_earth_sim * (Vector3f(airspeed_body(0), airspeed_body(1), 0.0f));
9898
EXPECT_TRUE(matrix::isEqual(vel_wind_earth, Vector2f(vel_wind_expected.slice<2,1>(0,0))));
99-
EXPECT_FLOAT_EQ(height_before_pressure_correction, 0.0f);
99+
EXPECT_NEAR(height_before_pressure_correction, 0.0f, 1e-5f);
100100

101101
// Apply height correction
102102
const float static_pressure_coef_xp = 1.0f;

test/test_EKF_imuSampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ TEST_P(EkfImuSamplingTest, imuSamplingAtMultipleRates)
9494
EXPECT_TRUE(matrix::isEqual(accel, imu_sample_buffered.delta_vel/imu_sample_buffered.delta_vel_dt, 1e-7f));
9595
}
9696

97-
INSTANTIATE_TEST_CASE_P(imuSamplingAtMultipleRates,
97+
INSTANTIATE_TEST_SUITE_P(imuSamplingAtMultipleRates,
9898
EkfImuSamplingTest,
9999
::testing::Values(
100100
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}),

0 commit comments

Comments
 (0)