From 9c52dab0977d71afdfb17aa628e2aa952971676b Mon Sep 17 00:00:00 2001 From: "Joseph D. Gaeddert" Date: Sat, 2 Dec 2023 16:44:50 -0500 Subject: [PATCH] fec/autotest: checking that schemes are punctured --- src/fec/tests/fec_config_autotest.c | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/fec/tests/fec_config_autotest.c b/src/fec/tests/fec_config_autotest.c index c2f19f865..6cfadb55b 100644 --- a/src/fec/tests/fec_config_autotest.c +++ b/src/fec/tests/fec_config_autotest.c @@ -87,6 +87,7 @@ void autotest_fec_str2fec() CONTEND_EQUALITY( liquid_getopt_str2fec("v29p78"), LIQUID_FEC_CONV_V29P78); CONTEND_EQUALITY( liquid_getopt_str2fec("rs8"), LIQUID_FEC_RS_M8); } + void autotest_fec_is_convolutional() { CONTEND_EQUALITY( fec_scheme_is_convolutional(LIQUID_FEC_NONE), 0 ); @@ -117,3 +118,35 @@ void autotest_fec_is_convolutional() CONTEND_EQUALITY( fec_scheme_is_convolutional(LIQUID_FEC_CONV_V29P78), 1 ); CONTEND_EQUALITY( fec_scheme_is_convolutional(LIQUID_FEC_RS_M8), 0 ); } + +void autotest_fec_is_punctured() +{ + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_NONE), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_REP3), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_REP5), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_HAMMING74), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_HAMMING84), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_HAMMING128), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_GOLAY2412), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_SECDED2216), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_SECDED3932), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_SECDED7264), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V27), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V29), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V39), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V615), 0 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V27P23), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V27P34), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V27P45), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V27P56), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V27P67), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V27P78), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V29P23), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V29P34), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V29P45), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V29P56), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V29P67), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_CONV_V29P78), 1 ); + CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_RS_M8), 0 ); +} +