From 8bbd1a995be59485cb7078d3c6c6bbf9f9ae00c6 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 27 May 2022 14:12:58 +0300 Subject: [PATCH] libweston: remove UNIT_TEST This #define was used only by the matrix-test program, which was removed in the previous commit. Remove it as unused and fold away MATRIX_TEST_EXPORT. Signed-off-by: Pekka Paalanen --- include/libweston/matrix.h | 13 ------------- shared/matrix.c | 9 ++------- tests/meson.build | 2 -- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/libweston/matrix.h b/include/libweston/matrix.h index be4d4eb0..95a262bb 100644 --- a/include/libweston/matrix.h +++ b/include/libweston/matrix.h @@ -65,19 +65,6 @@ int weston_matrix_invert(struct weston_matrix *inverse, const struct weston_matrix *matrix); -#ifdef UNIT_TEST -# define MATRIX_TEST_EXPORT WL_EXPORT - -int -matrix_invert(double *A, unsigned *p, const struct weston_matrix *matrix); - -void -inverse_transform(const double *LU, const unsigned *p, float *v); - -#else -# define MATRIX_TEST_EXPORT static -#endif - #ifdef __cplusplus } #endif diff --git a/shared/matrix.c b/shared/matrix.c index 4e8d6b40..0df22840 100644 --- a/shared/matrix.c +++ b/shared/matrix.c @@ -31,12 +31,7 @@ #include #include -#ifdef UNIT_TEST -#define WL_EXPORT -#else #include -#endif - #include @@ -169,7 +164,7 @@ find_pivot(double *column, unsigned k) * LU decomposition, forward and back substitution: Chapter 3. */ -MATRIX_TEST_EXPORT inline int +static int matrix_invert(double *A, unsigned *p, const struct weston_matrix *matrix) { unsigned i, j, k; @@ -204,7 +199,7 @@ matrix_invert(double *A, unsigned *p, const struct weston_matrix *matrix) return 0; } -MATRIX_TEST_EXPORT inline void +static void inverse_transform(const double *LU, const unsigned *p, float *v) { /* Solve A * x = v, when we have P * A = L * U. diff --git a/tests/meson.build b/tests/meson.build index 8bb656f3..190255a7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -341,7 +341,6 @@ foreach t : tests t_name, t_sources, c_args: [ - '-DUNIT_TEST', '-DTHIS_TEST_NAME="' + t_name + '"', ], build_by_default: true, @@ -385,7 +384,6 @@ foreach t : tests_standalone exe_t = executable( 'test-@0@'.format(t.get(0)), srcs_t, - c_args: [ '-DUNIT_TEST' ], build_by_default: true, include_directories: common_inc, dependencies: deps_t,