Skip to content

Commit 9b9809e

Browse files
committed
cmocka: Remove legacy trigonometry suite
All nine CMock trigonometry tests have been ported to Ztest in test/ztest/unit/math/basic/trigonometry. Remove the now-redundant CMock suite. Changes: - Delete test/cmocka/src/math/trig/ and all its test files: acos_16b_fixed.c, acos_32b_fixed.c asin_16b_fixed.c, asin_32b_fixed.c cos_16b_fixed.c, cos_32b_fixed.c sin_16b_fixed.c, sin_32b_fixed.c lut_sin_16b_fixed.c - Remove the trig subdirectory entry from test/cmocka/src/math/CMakeLists.txt - Move test/cmocka/include/trig_tables.h to the ztest trigonometry directory as a git rename, so the full file history is preserved and the ztest suite owns it going forward Coverage analysis (native_sim, Twister vs. unit_test_defconfig): CMock stats for trig.c: - lines: 92.9 % (92/99) - funcs: 75.0 % (3/4) - branches: 76.5 % (26/34) Ztest stats for trig.c: - lines: 96.6 % (86/89) - funcs: 100.0 % (4/4) - branches: 89.6 % (43/48) CMock stats for lut_trig.c: - lines: 100.0 % (26/26) - funcs: 100.0 % (1/1) - branches: 100.0 % (12/12) Ztest stats for lut_trig.c: - lines: 100.0 % (17/17) - funcs: 100.0 % (2/2) - branches: 100.0 % (4/4) Notable improvements in the Ztest suite: - cmpx_cexp() was never called by CMock (0 calls); Ztest reaches it 1002 times, raising trig.c function coverage from 75 % to 100 % - lut_sin_16b_fixed test now exercises sofm_sine_lookup_16b() in addition to sofm_lut_sin_fixed_16b(), covering both functions in lut_trig.c vs. only one in CMock The previous commit that added test/cmocka/include to the ztest include path is superseded: trig_tables.h now lives alongside the tests that use it, so no out-of-tree include directory is needed. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent 8328fb0 commit 9b9809e

13 files changed

Lines changed: 0 additions & 562 deletions

File tree

test/cmocka/src/math/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
add_subdirectory(trig)
43
add_subdirectory(arithmetic)
54
add_subdirectory(fft)
65
add_subdirectory(window)

test/cmocka/src/math/trig/CMakeLists.txt

Lines changed: 0 additions & 46 deletions
This file was deleted.

test/cmocka/src/math/trig/acos_16b_fixed.c

Lines changed: 0 additions & 62 deletions
This file was deleted.

test/cmocka/src/math/trig/acos_32b_fixed.c

Lines changed: 0 additions & 62 deletions
This file was deleted.

test/cmocka/src/math/trig/asin_16b_fixed.c

Lines changed: 0 additions & 62 deletions
This file was deleted.

test/cmocka/src/math/trig/asin_32b_fixed.c

Lines changed: 0 additions & 62 deletions
This file was deleted.

test/cmocka/src/math/trig/cos_16b_fixed.c

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)