@@ -121,9 +121,11 @@ static void test_op2(int op, const uint16_t *ref, size_t length)
121121 free (output );
122122}
123123
124- DEFINE_TEST_VARIANT3 (op2 , arm_mat_add_f16 , OP2_ADD ,
124+ DEFINE_TEST_VARIANT3 (matrix_unary_f16 ,
125+ op2 , arm_mat_add_f16 , OP2_ADD ,
125126 ref_add , ARRAY_SIZE (ref_add ));
126- DEFINE_TEST_VARIANT3 (op2 , arm_mat_sub_f16 , OP2_SUB ,
127+ DEFINE_TEST_VARIANT3 (matrix_unary_f16 ,
128+ op2 , arm_mat_sub_f16 , OP2_SUB ,
127129 ref_sub , ARRAY_SIZE (ref_sub ));
128130
129131static void test_op1 (int op , const uint16_t * ref , size_t length ,
@@ -200,12 +202,14 @@ static void test_op1(int op, const uint16_t *ref, size_t length,
200202 free (output );
201203}
202204
203- DEFINE_TEST_VARIANT4 (op1 , arm_mat_scale_f16 , OP1_SCALE ,
205+ DEFINE_TEST_VARIANT4 (matrix_unary_f16 ,
206+ op1 , arm_mat_scale_f16 , OP1_SCALE ,
204207 ref_scale , ARRAY_SIZE (ref_scale ), false);
205- DEFINE_TEST_VARIANT4 (op1 , arm_mat_trans_f16 , OP1_TRANS ,
208+ DEFINE_TEST_VARIANT4 (matrix_unary_f16 ,
209+ op1 , arm_mat_trans_f16 , OP1_TRANS ,
206210 ref_trans , ARRAY_SIZE (ref_trans ), true);
207211
208- static void test_arm_mat_inverse_f16 ( void )
212+ ZTEST ( matrix_unary_f16 , test_arm_mat_inverse_f16 )
209213{
210214 size_t index ;
211215 size_t length = ARRAY_SIZE (ref_inv );
@@ -335,7 +339,8 @@ static void test_op2v(int op, const uint16_t *ref, size_t length)
335339 free (output_buf );
336340}
337341
338- DEFINE_TEST_VARIANT3 (op2v , arm_mat_vec_mult_f16 , OP2V_VEC_MULT ,
342+ DEFINE_TEST_VARIANT3 (matrix_unary_f16 ,
343+ op2v , arm_mat_vec_mult_f16 , OP2V_VEC_MULT ,
339344 ref_vec_mult , ARRAY_SIZE (ref_vec_mult ));
340345
341346static void test_op1c (int op , const uint16_t * ref , size_t length , bool transpose )
@@ -408,10 +413,11 @@ static void test_op1c(int op, const uint16_t *ref, size_t length, bool transpose
408413 free (output );
409414}
410415
411- DEFINE_TEST_VARIANT4 (op1c , arm_mat_cmplx_trans_f16 , OP1C_CMPLX_TRANS ,
416+ DEFINE_TEST_VARIANT4 (matrix_unary_f16 ,
417+ op1c , arm_mat_cmplx_trans_f16 , OP1C_CMPLX_TRANS ,
412418 ref_cmplx_trans , ARRAY_SIZE (ref_cmplx_trans ) / 2 , true);
413419
414- static void test_arm_mat_cholesky_f16 ( void )
420+ ZTEST ( matrix_unary_f16 , test_arm_mat_cholesky_f16 )
415421{
416422 size_t index ;
417423 size_t length = ARRAY_SIZE (ref_cholesky_dpo );
@@ -474,7 +480,7 @@ static void test_arm_mat_cholesky_f16(void)
474480 free (output );
475481}
476482
477- static void test_arm_mat_solve_upper_triangular_f16 ( void )
483+ ZTEST ( matrix_unary_f16 , test_arm_mat_solve_upper_triangular_f16 )
478484{
479485 size_t index ;
480486 size_t length = ARRAY_SIZE (ref_uptriangular_dpo );
@@ -551,7 +557,7 @@ static void test_arm_mat_solve_upper_triangular_f16(void)
551557 free (output );
552558}
553559
554- static void test_arm_mat_solve_lower_triangular_f16 ( void )
560+ ZTEST ( matrix_unary_f16 , test_arm_mat_solve_lower_triangular_f16 )
555561{
556562 size_t index ;
557563 size_t length = ARRAY_SIZE (ref_lotriangular_dpo );
@@ -628,20 +634,4 @@ static void test_arm_mat_solve_lower_triangular_f16(void)
628634 free (output );
629635}
630636
631- void test_matrix_unary_f16 (void )
632- {
633- ztest_test_suite (matrix_unary_f16 ,
634- ztest_unit_test (test_op2_arm_mat_add_f16 ),
635- ztest_unit_test (test_op2_arm_mat_sub_f16 ),
636- ztest_unit_test (test_op1_arm_mat_scale_f16 ),
637- ztest_unit_test (test_op1_arm_mat_trans_f16 ),
638- ztest_unit_test (test_arm_mat_inverse_f16 ),
639- ztest_unit_test (test_op2v_arm_mat_vec_mult_f16 ),
640- ztest_unit_test (test_op1c_arm_mat_cmplx_trans_f16 ),
641- ztest_unit_test (test_arm_mat_cholesky_f16 ),
642- ztest_unit_test (test_arm_mat_solve_upper_triangular_f16 ),
643- ztest_unit_test (test_arm_mat_solve_lower_triangular_f16 )
644- );
645-
646- ztest_run_test_suite (matrix_unary_f16 );
647- }
637+ ZTEST_SUITE (matrix_unary_f16 , NULL , NULL , NULL , NULL , NULL );
0 commit comments