Commit 5bd5a4b
test: ztest: Add math basic trigonometry unit tests converted from CMock
This patch converts 9 existing math trigonometry unit tests from
CMock/Unity to Zephyr's Ztest framework, maintaining the same test
coverage and functionality:
- test_sin_32b_fixed: 32-bit fixed-point sine function
- test_sin_16b_fixed: 16-bit fixed-point sine function
- test_cos_32b_fixed: 32-bit fixed-point cosine function
- test_cos_16b_fixed: 16-bit fixed-point cosine function
- test_asin_32b_fixed: 32-bit fixed-point arcsine function
- test_asin_16b_fixed: 16-bit fixed-point arcsine function
- test_acos_32b_fixed: 32-bit fixed-point arccosine function
- test_acos_16b_fixed: 16-bit fixed-point arccosine function
- test_sin_lut_16b_fixed: 16-bit sine lookup table function
Original tests converted from sof/test/cmocka/src/math/trig/ authored
by:
- Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
- Shriram Shastry <malladi.sastry@linux.intel.com>
- Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The converted tests validate the same trigonometric functions from
src/math/trig.c and src/math/lut_trig.c as the original CMock tests,
ensuring no regression in test coverage during the migration to Ztest
framework. Reference tables and tolerance values are preserved to
maintain identical test accuracy and validation criteria.
This is part of the broader SOF unit test migration from CMock to Zephyr
Ztest framework, establishing the foundation for math/basic/trigonometry
tests in the new directory structure.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 1117d0b commit 5bd5a4b
File tree
5 files changed
+649
-0
lines changed- test/ztest/unit/math/basic/trigonometry
5 files changed
+649
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments