From 3dc9e47fdf8b216b3a4221df3052d6a7e5220413 Mon Sep 17 00:00:00 2001 From: "Joseph D. Gaeddert" Date: Sat, 2 Dec 2023 19:35:03 -0500 Subject: [PATCH] fec/config: checking several more configurations --- src/fec/tests/fec_config_autotest.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/fec/tests/fec_config_autotest.c b/src/fec/tests/fec_config_autotest.c index 6cfadb55b..fd964fffe 100644 --- a/src/fec/tests/fec_config_autotest.c +++ b/src/fec/tests/fec_config_autotest.c @@ -150,3 +150,27 @@ void autotest_fec_is_punctured() CONTEND_EQUALITY( fec_scheme_is_punctured(LIQUID_FEC_RS_M8), 0 ); } +void autotest_fec_is_reedsolomon() +{ + CONTEND_EQUALITY( fec_scheme_is_reedsolomon(LIQUID_FEC_NONE), 0 ); + CONTEND_EQUALITY( fec_scheme_is_reedsolomon(LIQUID_FEC_REP3), 0 ); + CONTEND_EQUALITY( fec_scheme_is_reedsolomon(LIQUID_FEC_HAMMING74), 0 ); + CONTEND_EQUALITY( fec_scheme_is_reedsolomon(LIQUID_FEC_GOLAY2412), 0 ); + CONTEND_EQUALITY( fec_scheme_is_reedsolomon(LIQUID_FEC_SECDED2216), 0 ); + CONTEND_EQUALITY( fec_scheme_is_reedsolomon(LIQUID_FEC_CONV_V27), 0 ); + CONTEND_EQUALITY( fec_scheme_is_reedsolomon(LIQUID_FEC_RS_M8), 1 ); +} + +void autotest_fec_is_hamming() +{ + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_NONE), 0 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_REP3), 0 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_HAMMING74), 1 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_HAMMING84), 1 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_HAMMING128), 1 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_GOLAY2412), 0 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_SECDED2216), 0 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_CONV_V27), 0 ); + CONTEND_EQUALITY( fec_scheme_is_hamming(LIQUID_FEC_RS_M8), 0 ); +} +