Skip to content

Commit 8328fb0

Browse files
committed
ztest: math: reference cmocka trig_tables.h instead of copying it
The ztest trigonometry suite had a local copy of test/cmocka/include/trig_tables.h. This was a mistake: when the legacy CMock tests are eventually removed, the original header will disappear losing git history. Fix this by: - Deleting the duplicate trig_tables.h from the ztest directory - Adding test/cmocka/include to the CMakeLists include path so the ztest suite references the single source-of-truth header directly - Moving tolerance constants that were defined in the local copy into trig_test.c, where they are actually used With this change, any future rename or move of the CMock header will be handled in one place and the ztest suite will follow automatically. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent 0a7e671 commit 8328fb0

3 files changed

Lines changed: 11 additions & 373 deletions

File tree

test/ztest/unit/math/basic/trigonometry/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ set(SOF_ROOT "${PROJECT_SOURCE_DIR}/../../../../../..")
88
target_include_directories(app PRIVATE
99
${SOF_ROOT}/zephyr/include
1010
${SOF_ROOT}/src/include
11+
${SOF_ROOT}/test/cmocka/include
1112
)
1213

1314
# Define SOF-specific configurations for unit testing

0 commit comments

Comments
 (0)