Commit 9b9809e
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
- trig
- ztest/unit/math/basic/trigonometry
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments