diff options
author | JanHenrik <janhenrik@janhenrik.org> | 2020-01-19 00:56:37 +0100 |
---|---|---|
committer | JanHenrik <janhenrik@janhenrik.org> | 2020-01-19 00:56:37 +0100 |
commit | a81fc41c3eb99e8fc52aa734ee63e13c937aab81 (patch) | |
tree | 19974c4676ed64d6e4260b79fc3f1eaeda58a289 /Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/x_to_y_tests.c | |
parent | a96ec5d9995e7e4b7315a192e543b88f0aff4930 (diff) | |
download | minikbd-a81fc41c3eb99e8fc52aa734ee63e13c937aab81.tar.gz minikbd-a81fc41c3eb99e8fc52aa734ee63e13c937aab81.tar.bz2 minikbd-a81fc41c3eb99e8fc52aa734ee63e13c937aab81.zip |
added blink example
Diffstat (limited to 'Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/x_to_y_tests.c')
-rw-r--r-- | Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/x_to_y_tests.c | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/x_to_y_tests.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/x_to_y_tests.c new file mode 100644 index 0000000..4667031 --- /dev/null +++ b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/Common/src/support_tests/x_to_y_tests.c @@ -0,0 +1,80 @@ +#include "jtest.h"
+#include "support_test_data.h"
+#include "arr_desc.h"
+#include "arm_math.h" /* FUTs */
+#include "ref.h" /* Reference Functions */
+#include "test_templates.h"
+#include "support_templates.h"
+#include "type_abbrev.h"
+
+/* Aliases to play nicely with templates. */
+#define arm_f32_to_q31 arm_float_to_q31
+#define arm_f32_to_q15 arm_float_to_q15
+#define arm_f32_to_q7 arm_float_to_q7
+#define arm_q31_to_f32 arm_q31_to_float
+#define arm_q15_to_f32 arm_q15_to_float
+#define arm_q7_to_f32 arm_q7_to_float
+#define ref_f32_to_q31 ref_float_to_q31
+#define ref_f32_to_q15 ref_float_to_q15
+#define ref_f32_to_q7 ref_float_to_q7
+#define ref_q31_to_f32 ref_q31_to_float
+#define ref_q15_to_f32 ref_q15_to_float
+#define ref_q7_to_f32 ref_q7_to_float
+
+#define JTEST_ARM_X_TO_Y_TEST(prefix, suffix) \
+ JTEST_DEFINE_TEST(arm_##prefix##_to_##suffix##_test, \
+ arm_##prefix##_to_##suffix) \
+ { \
+ TEST_TEMPLATE_BUF1_BLK( \
+ support_f_all, \
+ support_block_sizes, \
+ TYPE_FROM_ABBREV(prefix), \
+ TYPE_FROM_ABBREV(suffix), \
+ arm_##prefix##_to_##suffix, \
+ ARM_x_to_y_INPUT_INTERFACE, \
+ ref_##prefix##_to_##suffix, \
+ REF_x_to_y_INPUT_INTERFACE, \
+ SUPPORT_COMPARE_INTERFACE); \
+ }
+
+JTEST_ARM_X_TO_Y_TEST(f32, q31);
+JTEST_ARM_X_TO_Y_TEST(f32, q15);
+JTEST_ARM_X_TO_Y_TEST(f32, q7);
+
+JTEST_ARM_X_TO_Y_TEST(q31, f32);
+JTEST_ARM_X_TO_Y_TEST(q31, q15);
+JTEST_ARM_X_TO_Y_TEST(q31, q7);
+
+JTEST_ARM_X_TO_Y_TEST(q15, f32);
+JTEST_ARM_X_TO_Y_TEST(q15, q31);
+JTEST_ARM_X_TO_Y_TEST(q15, q7);
+
+JTEST_ARM_X_TO_Y_TEST(q7, f32);
+JTEST_ARM_X_TO_Y_TEST(q7, q31);
+JTEST_ARM_X_TO_Y_TEST(q7, q15);
+
+/*--------------------------------------------------------------------------------*/
+/* Collect all tests in a group. */
+/*--------------------------------------------------------------------------------*/
+
+JTEST_DEFINE_GROUP(x_to_y_tests)
+{
+ /*
+ To skip a test, comment it out.
+ */
+ JTEST_TEST_CALL(arm_f32_to_q31_test);
+ JTEST_TEST_CALL(arm_f32_to_q15_test);
+ JTEST_TEST_CALL(arm_f32_to_q7_test);
+
+ JTEST_TEST_CALL(arm_q31_to_f32_test);
+ JTEST_TEST_CALL(arm_q31_to_q15_test);
+ JTEST_TEST_CALL(arm_q31_to_q7_test);
+
+ JTEST_TEST_CALL(arm_q15_to_f32_test);
+ JTEST_TEST_CALL(arm_q15_to_q31_test);
+ JTEST_TEST_CALL(arm_q15_to_q7_test);
+
+ JTEST_TEST_CALL(arm_q7_to_f32_test);
+ JTEST_TEST_CALL(arm_q7_to_q31_test);
+ JTEST_TEST_CALL(arm_q7_to_q15_test);
+}
|