Skip to content

Commit

Permalink
firdes/autotest: checking edge cases in create() for arkaiser, rkaiser
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaeddert committed Apr 17, 2024
1 parent e98f1b8 commit 66c78a6
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/filter/tests/firdes_autotest.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,19 @@ void autotest_liquid_firdes_config()
CONTEND_EQUALITY(liquid_firdes_windowf(wtype, h_len, 0.0f, 0, h), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_windowf(wtype, h_len, 0.6f, 0, h), LIQUID_EICONFIG);

CONTEND_EQUALITY(liquid_firdes_rkaiser(0, 12, 0.2f, 0, NULL), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 0, 0.2f, 0, NULL), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 12, 2.7f, 0, NULL), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 12, 0.2f, 3, NULL), LIQUID_EICONFIG);

CONTEND_EQUALITY(liquid_firdes_arkaiser(0, 12, 0.2f, 0, NULL), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 0, 0.2f, 0, NULL), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 12, 2.7f, 0, NULL), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 12, 0.2f, 3, NULL), LIQUID_EICONFIG);
CONTEND_EQUALITY(liquid_firdes_rkaiser(0, 12, 0.2f, 0, NULL), LIQUID_EICONFIG); // k too small
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 0, 0.2f, 0, NULL), LIQUID_EICONFIG); // m too small
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 12,-0.7f, 0, NULL), LIQUID_EICONFIG); // beta too small
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 12, 2.7f, 0, NULL), LIQUID_EICONFIG); // beta too large
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 12, 0.2f,-2, NULL), LIQUID_EICONFIG); // dt too small
CONTEND_EQUALITY(liquid_firdes_rkaiser(2, 12, 0.2f, 3, NULL), LIQUID_EICONFIG); // dt too large

CONTEND_EQUALITY(liquid_firdes_arkaiser(0, 12, 0.2f, 0, NULL), LIQUID_EICONFIG); // k too small
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 0, 0.2f, 0, NULL), LIQUID_EICONFIG); // m too small
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 12,-0.7f, 0, NULL), LIQUID_EICONFIG); // beta too small
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 12, 2.7f, 0, NULL), LIQUID_EICONFIG); // beta too large
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 12, 0.2f,-2, NULL), LIQUID_EICONFIG); // dt too small
CONTEND_EQUALITY(liquid_firdes_arkaiser(2, 12, 0.2f, 3, NULL), LIQUID_EICONFIG); // dt too large

CONTEND_EQUALITY(liquid_firdes_kaiser(h_len, 0.2f, 60.0f, 0.0f, h), LIQUID_OK );
CONTEND_EQUALITY(liquid_firdes_kaiser( 0, 0.2f, 60.0f, 0.0f, h), LIQUID_EICONFIG);
Expand Down

0 comments on commit 66c78a6

Please sign in to comment.