LDPC codes with belief propagation decoding
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rename test_ functions in interop tests (merlint E330)

Removes redundant test_ prefix from functions in interop test.ml files
across the monorepo: test_decode → decode, test_encode → encode, etc.

+6 -6
+6 -6
test/interop/ccsds131/test.ml
··· 52 52 53 53 let ldpc = Ldpc.ccsds_rate_1_2 54 54 55 - let test_encode row () = 55 + let encode row () = 56 56 let info = hex_to_bytes row.info_hex in 57 57 let got = Ldpc.encode ldpc info in 58 58 let expected = hex_to_bytes row.codeword_hex in ··· 60 60 Alcotest.failf "%s: encode mismatch\n expected: %s\n got: %s" 61 61 row.name (bytes_to_hex expected) (bytes_to_hex got) 62 62 63 - let test_decode row () = 63 + let decode row () = 64 64 let codeword = hex_to_bytes row.codeword_hex in 65 65 let expected_info = hex_to_bytes row.info_hex in 66 66 match Ldpc.decode ldpc codeword with ··· 72 72 (bytes_to_hex recovered) 73 73 | Error e -> Alcotest.failf "%s: decode failed: %s" row.name e 74 74 75 - let test_roundtrip row () = 75 + let roundtrip row () = 76 76 let info = hex_to_bytes row.info_hex in 77 77 let codeword = Ldpc.encode ldpc info in 78 78 match Ldpc.decode ldpc codeword with ··· 88 88 [ 89 89 ( "encode", 90 90 List.map 91 - (fun r -> Alcotest.test_case r.name `Quick (test_encode r)) 91 + (fun r -> Alcotest.test_case r.name `Quick (encode r)) 92 92 rows ); 93 93 ( "decode", 94 94 List.map 95 - (fun r -> Alcotest.test_case r.name `Quick (test_decode r)) 95 + (fun r -> Alcotest.test_case r.name `Quick (decode r)) 96 96 rows ); 97 97 ( "roundtrip", 98 98 List.map 99 - (fun r -> Alcotest.test_case r.name `Quick (test_roundtrip r)) 99 + (fun r -> Alcotest.test_case r.name `Quick (roundtrip r)) 100 100 rows ); 101 101 ]