summaryrefslogtreecommitdiff
path: root/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c
diff options
context:
space:
mode:
authorjoshua <joshua@joshuayun.com>2023-12-30 23:54:31 -0500
committerjoshua <joshua@joshuayun.com>2023-12-30 23:54:31 -0500
commit86608c6770cf08c138a2bdab5855072f64be09ef (patch)
tree494a61b3ef37e76f9235a0d10f5c93d97290a35f /Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c
downloadsdr-software-master.tar.gz
initial commitHEADmaster
Diffstat (limited to 'Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c')
-rw-r--r--Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c b/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c
new file mode 100644
index 0000000..d9b1a24
--- /dev/null
+++ b/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/statistics_tests/rms_tests.c
@@ -0,0 +1,34 @@
+#include "jtest.h"
+#include "statistics_test_data.h"
+#include "arr_desc.h"
+#include "arm_math.h" /* FUTs */
+#include "ref.h" /* Reference Functions */
+#include "test_templates.h"
+#include "statistics_templates.h"
+#include "type_abbrev.h"
+
+#define JTEST_ARM_RMS_TEST(suffix) \
+ STATISTICS_DEFINE_TEST_TEMPLATE_BUF1_BLK( \
+ rms, \
+ suffix, \
+ TYPE_FROM_ABBREV(suffix), \
+ TYPE_FROM_ABBREV(suffix), \
+ STATISTICS_SNR_COMPARE_INTERFACE)
+
+JTEST_ARM_RMS_TEST(f32);
+JTEST_ARM_RMS_TEST(q31);
+JTEST_ARM_RMS_TEST(q15);
+
+/*--------------------------------------------------------------------------------*/
+/* Collect all tests in a group. */
+/*--------------------------------------------------------------------------------*/
+
+JTEST_DEFINE_GROUP(rms_tests)
+{
+ /*
+ To skip a test, comment it out.
+ */
+ JTEST_TEST_CALL(arm_rms_f32_test);
+ JTEST_TEST_CALL(arm_rms_q31_test);
+ JTEST_TEST_CALL(arm_rms_q15_test);
+}