From cde7b1bc418a71ac9ee5ec6ea67c250f6bfaf130 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Wed, 23 Feb 2022 16:05:58 +0100 Subject: [PATCH] Matrix: remove deprecated minimal test framework --- src/lib/matrix/test/CMakeLists.txt | 18 ----------- src/lib/matrix/test/test_macros.hpp | 46 ----------------------------- 2 files changed, 64 deletions(-) delete mode 100644 src/lib/matrix/test/test_macros.hpp diff --git a/src/lib/matrix/test/CMakeLists.txt b/src/lib/matrix/test/CMakeLists.txt index f0d9cec684..c3ea1d8e6c 100644 --- a/src/lib/matrix/test/CMakeLists.txt +++ b/src/lib/matrix/test/CMakeLists.txt @@ -1,26 +1,8 @@ -#include(gtest.cmake) - add_compile_options( -Wno-double-promotion -Wno-float-equal ) -set(tests -) - -add_custom_target(test_build) -foreach(test_name ${tests}) - add_executable(test-matrix_${test_name} ${test_name}.cpp) - - add_test(NAME test-matrix_${test_name} - COMMAND test-matrix_${test_name} - WORKING_DIRECTORY ${PX4_BINARY_DIR} - ) - - add_dependencies(test_build test-matrix_${test_name}) - add_dependencies(test_results test-matrix_${test_name}) -endforeach() - px4_add_unit_gtest(SRC MatrixAssignmentTest.cpp) px4_add_unit_gtest(SRC MatrixAttitudeTest.cpp) px4_add_unit_gtest(SRC MatrixCopyToTest.cpp) diff --git a/src/lib/matrix/test/test_macros.hpp b/src/lib/matrix/test/test_macros.hpp deleted file mode 100644 index d6ca2d2fb1..0000000000 --- a/src/lib/matrix/test/test_macros.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @file test_marcos.hpp - * - * Helps with cmake testing. - * - * @author James Goppert - * Pavel Kirienko - */ -#pragma once - -#include -#include // cmath has to be introduced BEFORE we poison the C library identifiers - -#define TEST(X) if(!(X)) { fprintf(stderr, "test failed on %s:%d\n", __FILE__, __LINE__); return -1;} - -/** - * This construct is needed to catch any unintended use of the C standard library. - * Feel free to extend the list of poisoned identifiers with as many C functions as possible. - * The current list was constructed by means of automated parsing of http://en.cppreference.com/w/c/numeric/math - */ -#ifdef __GNUC__ - -// float functions -# pragma GCC poison fabsf fmodf -# pragma GCC poison remainderf remquof fmaf fmaxf fminf fdimf fnanf expf -# pragma GCC poison exp2f expm1f logf log10f log2f log1pf powf sqrtf cbrtf -# pragma GCC poison hypotf sinf cosf tanf asinf acosf atanf atan2f sinhf -# pragma GCC poison coshf tanhf asinhf acoshf atanhf erff erfcf tgammaf -# pragma GCC poison lgammaf ceilf floorf truncf roundf nearbyintf rintf -# pragma GCC poison frexpf ldexpf modff scalbnf ilogbf logbf nextafterf -# pragma GCC poison copysignf - -// the list of double functions is missing because otherwise most functions from std:: would be also poisoned, -// which we don't want - -// long double functions -# pragma GCC poison fabsl fabsl fabsl fmodl -# pragma GCC poison remainderl remquol fmal fmaxl fminl fdiml fnanl expl -# pragma GCC poison exp2l expm1l logl log10l log2l log1pl powl sqrtl cbrtl -# pragma GCC poison hypotl sinl cosl tanl asinl acosl atanl atan2l sinhl -# pragma GCC poison coshl tanhl asinhl acoshl atanhl erfl erfcl tgammal -# pragma GCC poison lgammal ceill floorl truncl roundl nearbyintl rintl -# pragma GCC poison frexpl ldexpl modfl scalbnl ilogbl logbl nextafterl -# pragma GCC poison copysignl - -#endif